From: Minje Ahn Date: Fri, 10 Sep 2021 00:48:58 +0000 (+0900) Subject: [UTC][media-content][Non-ACR] Apply indent X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f91c76b738c823f1aa627b9183bb64835df48ad;p=test%2Ftct%2Fnative%2Fapi.git [UTC][media-content][Non-ACR] Apply indent Change-Id: I0675e85c2384210d888017150e49da0cf4c30f26 Signed-off-by: Minje Ahn --- diff --git a/src/utc/media-content/utc-media-audio.c b/src/utc/media-content/utc-media-audio.c index 55f16ca2b..ecf70f716 100755 --- a/src/utc/media-content/utc-media-audio.c +++ b/src/utc/media-content/utc-media-audio.c @@ -29,7 +29,6 @@ static char *g_media_id = NULL; static char *dir_path = NULL; static GMainLoop *g_loop = NULL; - static media_content_error_e cb_result = MEDIA_CONTENT_ERROR_NONE; static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; @@ -42,7 +41,7 @@ static bool __storage_device_supported_cb(int storage_id, storage_type_e type, s return true; } -static void _scan_folder_cb(media_content_error_e error, void * user_data) +static void _scan_folder_cb(media_content_error_e error, void *user_data) { cb_result = error; g_main_loop_quit(g_loop); @@ -72,7 +71,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return true; } - /** * @function utc_media_audio_startup * @description Called before each test @@ -112,7 +110,7 @@ void utc_media_audio_startup(void) return; } - ret = media_info_get_media_count_from_db(g_filter, &media_count); + ret = media_info_get_media_count_from_db(g_filter, &media_count); if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_info_foreach_media_from_db failed (code: %d)\n", ret); @@ -123,8 +121,8 @@ void utc_media_audio_startup(void) g_loop = g_main_loop_new(NULL, FALSE); context = g_main_loop_get_context(g_loop); source = g_idle_source_new(); - g_source_set_callback (source, _startup_scan_start, NULL, NULL); - g_source_attach (source, context); + g_source_set_callback(source, _startup_scan_start, NULL, NULL); + g_source_attach(source, context); g_main_loop_run(g_loop); g_main_loop_unref(g_loop); @@ -148,7 +146,6 @@ void utc_media_audio_startup(void) } } - /** * @function utc_media_audio_cleanup * @description Called after each test @@ -183,7 +180,6 @@ void utc_media_audio_cleanup(void) media_content_disconnect(); } - /** * @testcase utc_media_audio_meta_destroy_n * @since_tizen 2.3 @@ -201,7 +197,6 @@ int utc_media_audio_meta_destroy_n(void) return 0; } - /** * @testcase utc_media_audio_meta_destroy_p * @since_tizen 2.3 @@ -225,7 +220,6 @@ int utc_media_audio_meta_destroy_p(void) return 0; } - /** * @testcase utc_media_audio_meta_clone_n * @since_tizen 2.3 @@ -243,7 +237,6 @@ int utc_media_audio_meta_clone_n(void) return 0; } - /** * @testcase utc_media_audio_meta_clone_p * @since_tizen 2.3 @@ -267,7 +260,6 @@ int utc_media_audio_meta_clone_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_media_id_n * @since_tizen 2.3 @@ -291,7 +283,6 @@ int utc_media_audio_meta_get_media_id_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_media_id_p * @since_tizen 2.3 @@ -338,7 +329,6 @@ int utc_media_audio_meta_get_album_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_album_p * @since_tizen 2.3 @@ -362,7 +352,6 @@ int utc_media_audio_meta_get_album_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_artist_n * @since_tizen 2.3 @@ -386,7 +375,6 @@ int utc_media_audio_meta_get_artist_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_artist_p * @since_tizen 2.3 @@ -411,7 +399,6 @@ int utc_media_audio_meta_get_artist_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_album_artist_n * @since_tizen 2.3 @@ -436,7 +423,6 @@ int utc_media_audio_meta_get_album_artist_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_album_artist_p * @since_tizen 2.3 @@ -461,7 +447,6 @@ int utc_media_audio_meta_get_album_artist_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_genre_n * @since_tizen 2.3 @@ -486,7 +471,6 @@ int utc_media_audio_meta_get_genre_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_genre_p * @since_tizen 2.3 @@ -511,7 +495,6 @@ int utc_media_audio_meta_get_genre_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_composer_n * @since_tizen 2.3 @@ -536,7 +519,6 @@ int utc_media_audio_meta_get_composer_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_composer_p * @since_tizen 2.3 @@ -561,7 +543,6 @@ int utc_media_audio_meta_get_composer_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_year_n * @since_tizen 2.3 @@ -586,7 +567,6 @@ int utc_media_audio_meta_get_year_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_year_p * @since_tizen 2.3 @@ -611,7 +591,6 @@ int utc_media_audio_meta_get_year_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_recorded_date_n * @since_tizen 2.3 @@ -636,7 +615,6 @@ int utc_media_audio_meta_get_recorded_date_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_recorded_date_p * @since_tizen 2.3 @@ -661,7 +639,6 @@ int utc_media_audio_meta_get_recorded_date_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_copyright_n * @since_tizen 2.3 @@ -686,7 +663,6 @@ int utc_media_audio_meta_get_copyright_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_copyright_p * @since_tizen 2.3 @@ -711,7 +687,6 @@ int utc_media_audio_meta_get_copyright_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_track_num_n * @since_tizen 2.3 @@ -736,7 +711,6 @@ int utc_media_audio_meta_get_track_num_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_track_num_p * @since_tizen 2.3 @@ -761,7 +735,6 @@ int utc_media_audio_meta_get_track_num_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_bit_rate_n * @since_tizen 2.3 @@ -780,7 +753,6 @@ int utc_media_audio_meta_get_bit_rate_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_bit_rate_p * @since_tizen 2.3 @@ -799,7 +771,6 @@ int utc_media_audio_meta_get_bit_rate_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_sample_rate_n * @since_tizen 2.3 @@ -818,7 +789,6 @@ int utc_media_audio_meta_get_sample_rate_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_sample_rate_p * @since_tizen 2.3 @@ -837,7 +807,6 @@ int utc_media_audio_meta_get_sample_rate_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_channel_n * @since_tizen 2.3 @@ -856,7 +825,6 @@ int utc_media_audio_meta_get_channel_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_channel_p * @since_tizen 2.3 @@ -875,7 +843,6 @@ int utc_media_audio_meta_get_channel_p(void) return 0; } - /** * @testcase utc_media_audio_meta_get_duration_n * @since_tizen 2.3 @@ -894,7 +861,6 @@ int utc_media_audio_meta_get_duration_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_duration_p * @since_tizen 2.3 @@ -931,7 +897,6 @@ int utc_media_audio_meta_get_bitpersample_n(void) return 0; } - /** * @testcase utc_media_audio_meta_get_bitpersample_p * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-book.c b/src/utc/media-content/utc-media-book.c index 6c5acea53..48a7d2c30 100755 --- a/src/utc/media-content/utc-media-book.c +++ b/src/utc/media-content/utc-media-book.c @@ -48,7 +48,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return true; } - /** * @function utc_media_book_startup * @description Called before each test @@ -92,7 +91,6 @@ void utc_media_book_startup(void) } } - /** * @function utc_media_book_cleanup * @description Called after each test @@ -125,8 +123,6 @@ void utc_media_book_cleanup(void) media_content_disconnect(); } - - /** * @testcase utc_media_book_meta_destroy_n * @since_tizen 6.5 @@ -142,8 +138,6 @@ int utc_media_book_meta_destroy_n(void) return 0; } - - /** * @testcase utc_media_book_meta_destroy_p * @since_tizen 6.5 @@ -163,7 +157,6 @@ int utc_media_book_meta_destroy_p(void) return 0; } - /** * @testcase utc_media_book_meta_clone_n * @since_tizen 6.5 @@ -179,7 +172,6 @@ int utc_media_book_meta_clone_n(void) return 0; } - /** * @testcase utc_media_book_meta_clone_p * @since_tizen 6.5 @@ -195,7 +187,6 @@ int utc_media_book_meta_clone_p(void) return 0; } - /** * @testcase utc_media_book_meta_get_media_id_n * @since_tizen 6.5 @@ -216,7 +207,6 @@ int utc_media_book_meta_get_media_id_n(void) return 0; } - /** * @testcase utc_media_book_meta_get_media_id_p * @since_tizen 6.5 @@ -237,7 +227,6 @@ int utc_media_book_meta_get_media_id_p(void) return 0; } - /** * @testcase utc_media_book_meta_get_subject_n * @since_tizen 6.5 @@ -258,7 +247,6 @@ int utc_media_book_meta_get_subject_n(void) return 0; } - /** * @testcase utc_media_book_meta_get_subject_p * @since_tizen 6.5 @@ -279,7 +267,6 @@ int utc_media_book_meta_get_subject_p(void) return 0; } - /** * @testcase utc_media_book_meta_get_author_n * @since_tizen 6.5 @@ -300,7 +287,6 @@ int utc_media_book_meta_get_author_n(void) return 0; } - /** * @testcase utc_media_book_meta_get_author_p * @since_tizen 6.5 @@ -321,7 +307,6 @@ int utc_media_book_meta_get_author_p(void) return 0; } - /** * @testcase utc_media_book_meta_get_date_n * @since_tizen 6.5 @@ -342,7 +327,6 @@ int utc_media_book_meta_get_date_n(void) return 0; } - /** * @testcase utc_media_book_meta_get_date_p * @since_tizen 6.5 @@ -363,7 +347,6 @@ int utc_media_book_meta_get_date_p(void) return 0; } - /** * @testcase utc_media_book_meta_get_publisher_n * @since_tizen 6.5 @@ -384,8 +367,6 @@ int utc_media_book_meta_get_publisher_n(void) return 0; } - - /** * @testcase utc_media_book_meta_get_publisher_p * @since_tizen 6.5 diff --git a/src/utc/media-content/utc-media-bookmark-delete.c b/src/utc/media-content/utc-media-bookmark-delete.c index bb2e665c5..1fb3ca8cd 100755 --- a/src/utc/media-content/utc-media-bookmark-delete.c +++ b/src/utc/media-content/utc-media-bookmark-delete.c @@ -29,24 +29,22 @@ static int g_bookmark_id; static bool del_flag = false; -static char* img_path = NULL; +static char *img_path = NULL; static const char *img_file = "image.jpg"; - static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) { if (type == STORAGE_TYPE_INTERNAL) { - img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6); - memset(img_path,0x00,strlen(path) + strlen(img_file) + 6); - snprintf(img_path,strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); + img_path = (char *)malloc(strlen(path) + strlen(img_file) + 6); + memset(img_path, 0x00, strlen(path) + strlen(img_file) + 6); + snprintf(img_path, strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); return false; } return true; } - static bool bookmark_cb(media_bookmark_h bookmark, void *user_data) { int ret = MEDIA_CONTENT_ERROR_NONE; @@ -68,13 +66,12 @@ static bool bookmark_cb(media_bookmark_h bookmark, void *user_data) return false; } - static bool media_item_cb(media_info_h media, void *user_data) { int ret = MEDIA_CONTENT_ERROR_NONE; ret = media_info_get_media_id(media, &g_media_id); - if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL)) { + if ((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL)) { fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret); return false; @@ -83,7 +80,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return false; } - /** * @function utc_media_bookmark_delete_startup * @description Called before each test @@ -92,7 +88,7 @@ static bool media_item_cb(media_info_h media, void *user_data) */ void utc_media_bookmark_delete_startup(void) { - media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE; + media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE; if (storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); @@ -124,7 +120,7 @@ void utc_media_bookmark_delete_startup(void) return; } - time_t stTime = {0}; + time_t stTime = { 0 }; time(&stTime); fprintf(stderr, "%s:%d img_path = %s\n", __FILE__, __LINE__, img_path); ret = media_bookmark_insert_to_db(g_media_id, stTime, img_path); @@ -144,7 +140,6 @@ void utc_media_bookmark_delete_startup(void) } } - /** * @function utc_media_bookmark_delete_cleanup * @description Called after each test @@ -181,7 +176,6 @@ void utc_media_bookmark_delete_cleanup(void) } } - /** * @testcase utc_media_bookmark_delete_from_db_n * @since_tizen 2.3 @@ -201,7 +195,6 @@ int utc_media_bookmark_delete_from_db_n(void) return 0; } - /** * @testcase utc_media_bookmark_delete_from_db_p * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-bookmark-insert.c b/src/utc/media-content/utc-media-bookmark-insert.c index 43c32162d..425851044 100755 --- a/src/utc/media-content/utc-media-bookmark-insert.c +++ b/src/utc/media-content/utc-media-bookmark-insert.c @@ -27,24 +27,22 @@ static char *g_media_id = NULL; static filter_h g_filter; static int g_bookmark_id; -static char* img_path = NULL; +static char *img_path = NULL; static const char *img_file = "image.jpg"; - static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) { if (type == STORAGE_TYPE_INTERNAL) { - img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6); - memset(img_path,0x00,strlen(path) + strlen(img_file) + 6); - snprintf(img_path,strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); + img_path = (char *)malloc(strlen(path) + strlen(img_file) + 6); + memset(img_path, 0x00, strlen(path) + strlen(img_file) + 6); + snprintf(img_path, strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); return false; } return true; } - static bool bookmark_cb(media_bookmark_h bookmark, void *user_data) { int ret = MEDIA_CONTENT_ERROR_NONE; @@ -66,7 +64,6 @@ static bool bookmark_cb(media_bookmark_h bookmark, void *user_data) return false; } - static bool media_item_cb(media_info_h media, void *user_data) { int ret = MEDIA_CONTENT_ERROR_NONE; @@ -81,7 +78,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return false; } - /** * @function utc_media_bookmark_insert_startup * @description Called before each test @@ -123,7 +119,6 @@ void utc_media_bookmark_insert_startup(void) } } - /** * @function utc_media_bookmark_insert_cleanup * @description Called after each test @@ -157,7 +152,6 @@ void utc_media_bookmark_insert_cleanup(void) } } - /** * @testcase utc_media_bookmark_insert_to_db_n * @since_tizen 2.3 @@ -175,7 +169,6 @@ int utc_media_bookmark_insert_to_db_n(void) return 0; } - /** * @testcase utc_media_bookmark_insert_to_db_p * @since_tizen 2.3 @@ -187,7 +180,7 @@ int utc_media_bookmark_insert_to_db_p(void) int ret = MEDIA_CONTENT_ERROR_NONE; - time_t stTime = {0}; + time_t stTime = { 0 }; time(&stTime); fprintf(stderr, "%s:%d img_path = %s\n", __FILE__, __LINE__, img_path); ret = media_bookmark_insert_to_db(g_media_id, stTime, img_path); diff --git a/src/utc/media-content/utc-media-bookmark.c b/src/utc/media-content/utc-media-bookmark.c index 4ea16d1fc..f11f3a7bb 100755 --- a/src/utc/media-content/utc-media-bookmark.c +++ b/src/utc/media-content/utc-media-bookmark.c @@ -28,27 +28,22 @@ static char *g_media_id = NULL; static filter_h g_filter = NULL; static int g_bookmark_id = 0; -static char* img_path = NULL; +static char *img_path = NULL; static const char *img_file = "image.jpg"; - - static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; - static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) { - if (type == STORAGE_TYPE_INTERNAL) - { - img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6); - memset(img_path,0x00,strlen(path) + strlen(img_file) + 6); - snprintf(img_path,strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); + if (type == STORAGE_TYPE_INTERNAL) { + img_path = (char *)malloc(strlen(path) + strlen(img_file) + 6); + memset(img_path, 0x00, strlen(path) + strlen(img_file) + 6); + snprintf(img_path, strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); return false; } return true; } - static bool bookmark_cb(media_bookmark_h bookmark, void *user_data) { media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE; @@ -72,7 +67,6 @@ static bool bookmark_cb(media_bookmark_h bookmark, void *user_data) return false; } - static bool media_item_cb(media_info_h media, void *user_data) { int ret = MEDIA_CONTENT_ERROR_NONE; @@ -87,7 +81,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return false; } - static bool sub_bookmark_cb(media_bookmark_h bookmark, void *user_data) { int bm_id = 0; @@ -98,7 +91,6 @@ static bool sub_bookmark_cb(media_bookmark_h bookmark, void *user_data) return false; } - /** * @function utc_media_bookmark_startup * @description Called before each test @@ -141,7 +133,7 @@ void utc_media_bookmark_startup(void) return; } - time_t stTime = {0}; + time_t stTime = { 0 }; time(&stTime); fprintf(stderr, "%s:%d img_path = %s\n", __FILE__, __LINE__, img_path); ret = media_bookmark_insert_to_db(g_media_id, stTime, img_path); @@ -161,7 +153,6 @@ void utc_media_bookmark_startup(void) } } - /** * @function utc_media_bookmark_cleanup * @description Called after each test @@ -199,7 +190,6 @@ void utc_media_bookmark_cleanup(void) } } - /** * @testcase utc_media_bookmark_get_bookmark_count_from_db_n * @since_tizen 2.3 @@ -217,7 +207,6 @@ int utc_media_bookmark_get_bookmark_count_from_db_n(void) return 0; } - /** * @testcase utc_media_bookmark_get_bookmark_count_from_db_p * @since_tizen 2.3 @@ -236,7 +225,6 @@ int utc_media_bookmark_get_bookmark_count_from_db_p(void) return 0; } - /** * @testcase utc_media_bookmark_foreach_bookmark_from_db_n * @since_tizen 4.0 @@ -254,7 +242,6 @@ int utc_media_bookmark_foreach_bookmark_from_db_n(void) return 0; } - /** * @testcase utc_media_bookmark_foreach_bookmark_from_db_p * @since_tizen 4.0 @@ -273,7 +260,6 @@ int utc_media_bookmark_foreach_bookmark_from_db_p(void) return 0; } - /** * @testcase utc_media_bookmark_clone_n * @since_tizen 2.3 @@ -291,7 +277,6 @@ int utc_media_bookmark_clone_n(void) return 0; } - /** * @testcase utc_media_bookmark_clone_p * @since_tizen 2.3 @@ -309,7 +294,6 @@ int utc_media_bookmark_clone_p(void) return 0; } - /** * @testcase utc_media_bookmark_destroy_n * @since_tizen 2.3 @@ -327,7 +311,6 @@ int utc_media_bookmark_destroy_n(void) return 0; } - /** * @testcase utc_media_bookmark_destroy_p * @since_tizen 2.3 @@ -350,7 +333,6 @@ int utc_media_bookmark_destroy_p(void) return 0; } - /** * @testcase utc_media_bookmark_get_bookmark_id_n * @since_tizen 2.3 @@ -368,7 +350,6 @@ int utc_media_bookmark_get_bookmark_id_n(void) return 0; } - /** * @testcase utc_media_bookmark_get_bookmark_id_p * @since_tizen 2.3 @@ -387,7 +368,6 @@ int utc_media_bookmark_get_bookmark_id_p(void) return 0; } - /** * @testcase utc_media_bookmark_get_marked_time_n * @since_tizen 2.3 @@ -405,7 +385,6 @@ int utc_media_bookmark_get_marked_time_n(void) return 0; } - /** * @testcase utc_media_bookmark_get_marked_time_p * @since_tizen 2.3 @@ -424,7 +403,6 @@ int utc_media_bookmark_get_marked_time_p(void) return 0; } - /** * @testcase utc_media_bookmark_get_thumbnail_path_n * @since_tizen 2.3 @@ -442,7 +420,6 @@ int utc_media_bookmark_get_thumbnail_path_n(void) return 0; } - /** * @testcase utc_media_bookmark_get_thumbnail_path_p * @since_tizen 2.3 @@ -484,7 +461,6 @@ int utc_media_bookmark_get_name_n(void) return 0; } - /** * @testcase utc_media_bookmark_get_name_p * @since_tizen 2.3 @@ -581,4 +557,3 @@ int utc_media_bookmark_update_to_db_p(void) return 0; } - diff --git a/src/utc/media-content/utc-media-content.c b/src/utc/media-content/utc-media-content.c index a1df34ec0..21f5a7c21 100755 --- a/src/utc/media-content/utc-media-content.c +++ b/src/utc/media-content/utc-media-content.c @@ -35,15 +35,14 @@ static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) { - if (type == STORAGE_TYPE_INTERNAL) - { - g_origin_path = (char*)malloc(strlen(path) + strlen(g_origin_file) + 6); - memset(g_origin_path,0x00,strlen(path) + strlen(g_origin_file) + 6); - snprintf(g_origin_path,strlen(path) + strlen(g_origin_file) + 6, "%s/res/%s", path, g_origin_file); + if (type == STORAGE_TYPE_INTERNAL) { + g_origin_path = (char *)malloc(strlen(path) + strlen(g_origin_file) + 6); + memset(g_origin_path, 0x00, strlen(path) + strlen(g_origin_file) + 6); + snprintf(g_origin_path, strlen(path) + strlen(g_origin_file) + 6, "%s/res/%s", path, g_origin_file); - g_insert_path = (char*)malloc(strlen(path) + strlen(g_insert_file) + 6); - memset(g_insert_path,0x00,strlen(path) + strlen(g_insert_file) + 6); - snprintf(g_insert_path,strlen(path) + strlen(g_insert_file) + 6, "%s/res/%s", path, g_insert_file); + g_insert_path = (char *)malloc(strlen(path) + strlen(g_insert_file) + 6); + memset(g_insert_path, 0x00, strlen(path) + strlen(g_insert_file) + 6); + snprintf(g_insert_path, strlen(path) + strlen(g_insert_file) + 6, "%s/res/%s", path, g_insert_file); dir_path = strdup(path); @@ -52,7 +51,7 @@ static bool __storage_device_supported_cb(int storage_id, storage_type_e type, s return true; } -static void _scan_folder_cb(media_content_error_e error, void * user_data) +static void _scan_folder_cb(media_content_error_e error, void *user_data) { cb_result = error; } @@ -95,8 +94,8 @@ void utc_media_content_startup(void) g_loop = g_main_loop_new(NULL, FALSE); context = g_main_loop_get_context(g_loop); source = g_idle_source_new(); - g_source_set_callback (source, _startup_scan_start, NULL, NULL); - g_source_attach (source, context); + g_source_set_callback(source, _startup_scan_start, NULL, NULL); + g_source_attach(source, context); g_main_loop_run(g_loop); g_main_loop_unref(g_loop); @@ -110,7 +109,7 @@ void utc_media_content_startup(void) } if (!g_file_test(g_insert_path, G_FILE_TEST_EXISTS)) { - char test_copy[256] = {0, }; + char test_copy[256] = { 0, }; snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path); if (system(test_copy) < 0) { @@ -122,7 +121,6 @@ void utc_media_content_startup(void) } } - /** * @function utc_media_content_cleanup * @description Called after each test @@ -147,20 +145,10 @@ void utc_media_content_cleanup(void) media_content_disconnect(); } - -static void _noti_cb(media_content_error_e error, - int pid, - media_content_db_update_item_type_e update_item, - media_content_db_update_type_e update_type, - media_content_type_e media_type, - char *uuid, - char *path, - char *mime_type, - void *user_data) +static void _noti_cb(media_content_error_e error, int pid, media_content_db_update_item_type_e update_item, media_content_db_update_type_e update_type, media_content_type_e media_type, char *uuid, char *path, char *mime_type, void *user_data) { } - /** * @testcase utc_media_content_connect_p * @since_tizen 2.3 @@ -196,7 +184,6 @@ int utc_media_content_connect_n(void) return 0; } - /** * @testcase utc_media_content_disconnect_p * @since_tizen 2.3 @@ -215,7 +202,6 @@ int utc_media_content_disconnect_p(void) return 0; } - /** * @testcase utc_media_content_disconnect_n * @since_tizen 2.3 @@ -234,7 +220,6 @@ int utc_media_content_disconnect_n(void) return 0; } - /** * @testcase utc_media_content_scan_file_n * @since_tizen 2.3 @@ -252,7 +237,6 @@ int utc_media_content_scan_file_n(void) return 0; } - /** * @testcase utc_media_content_scan_file_p * @since_tizen 2.3 @@ -271,7 +255,6 @@ int utc_media_content_scan_file_p(void) return 0; } - /** * @testcase utc_media_content_scan_folder_n * @since_tizen 2.3 @@ -302,7 +285,6 @@ static gboolean _scan_folder_start(gpointer data) return false; } - /** * @testcase utc_media_content_scan_folder_p * @since_tizen 2.3 @@ -320,8 +302,8 @@ int utc_media_content_scan_folder_p(void) g_loop = g_main_loop_new(NULL, FALSE); context = g_main_loop_get_context(g_loop); source = g_idle_source_new(); - g_source_set_callback (source, _scan_folder_start, NULL, NULL); - g_source_attach (source, context); + g_source_set_callback(source, _scan_folder_start, NULL, NULL); + g_source_attach(source, context); g_main_loop_run(g_loop); g_main_loop_unref(g_loop); @@ -369,7 +351,6 @@ int utc_media_content_cancel_scan_folder_p(void) return 0; } - /** * @testcase utc_media_content_add_db_updated_cb_n * @since_tizen 3.0 @@ -389,7 +370,6 @@ int utc_media_content_add_db_updated_cb_n(void) return 0; } - /** * @testcase utc_media_content_add_db_updated_cb_p * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-face.c b/src/utc/media-content/utc-media-face.c index 613c15d30..599481f09 100755 --- a/src/utc/media-content/utc-media-face.c +++ b/src/utc/media-content/utc-media-face.c @@ -27,18 +27,17 @@ static media_face_h g_face_dst = NULL; static char *g_media_id = NULL; static char *g_face_id = NULL; -static char* img_path = NULL; +static char *img_path = NULL; static const char *img_file = "image.jpg"; static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; - static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) { if (type == STORAGE_TYPE_INTERNAL) { - img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6); - memset(img_path,0x00,strlen(path) + strlen(img_file) + 6); - snprintf(img_path,strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); + img_path = (char *)malloc(strlen(path) + strlen(img_file) + 6); + memset(img_path, 0x00, strlen(path) + strlen(img_file) + 6); + snprintf(img_path, strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); return false; } return true; @@ -84,7 +83,7 @@ static bool media_item_cb(media_info_h media, void *user_data) int ret = MEDIA_CONTENT_ERROR_NONE; ret = media_info_get_media_id(media, &g_media_id); - if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL)) { + if ((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL)) { return false; } @@ -135,7 +134,7 @@ void utc_media_face_startup(void) media_filter_create(&filter); media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT); media_filter_set_order(filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_DISPLAY_NAME, MEDIA_CONTENT_COLLATE_DEFAULT); - if(filter == NULL) { + if (filter == NULL) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_filter_create failed (code: %d)\n", ret); startup_ret = ret; @@ -143,7 +142,7 @@ void utc_media_face_startup(void) } ret = media_info_foreach_media_from_db(filter, media_item_cb, NULL); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_info_foreach_media_from_db failed (code: %d)\n", ret); startup_ret = ret; @@ -154,16 +153,15 @@ void utc_media_face_startup(void) filter = NULL; ret = media_face_create(g_media_id, &g_face); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_face_create failed (code: %d)\n", ret); startup_ret = ret; return; } - ret = media_face_set_face_rect(g_face, 10, 10, 10, 10); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_face_set_face_rect failed (code: %d)\n", ret); startup_ret = ret; @@ -171,7 +169,7 @@ void utc_media_face_startup(void) } ret = media_face_set_tag(g_face, "Test"); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_face_set_tag failed (code: %d)\n", ret); startup_ret = ret; @@ -179,7 +177,7 @@ void utc_media_face_startup(void) } ret = media_face_insert_to_db(g_face); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_face_insert_to_db failed (code: %d)\n", ret); startup_ret = ret; @@ -187,7 +185,7 @@ void utc_media_face_startup(void) } ret = media_face_destroy(g_face); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_face_destroy failed (code: %d)\n", ret); startup_ret = ret; @@ -195,7 +193,7 @@ void utc_media_face_startup(void) } ret = media_info_foreach_face_from_db(g_media_id, NULL, face_cb, NULL); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_info_foreach_face_from_db failed (code: %d)\n", ret); startup_ret = ret; @@ -203,7 +201,6 @@ void utc_media_face_startup(void) } } - /** * @function utc_media_face_cleanup * @description Called after each test @@ -419,12 +416,11 @@ int utc_media_face_get_face_rect_p(void) unsigned int rect_h = -1; ret = media_face_get_face_rect(g_face, &rect_x, &rect_y, &rect_w, &rect_h); - if (rect_x <= 0 || rect_y <= 0 ||rect_w <= 0 || rect_h <= 0) + if (rect_x <= 0 || rect_y <= 0 || rect_w <= 0 || rect_h <= 0) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - return 0; } diff --git a/src/utc/media-content/utc-media-filter-create.c b/src/utc/media-content/utc-media-filter-create.c index 82cea2187..47770cc5c 100755 --- a/src/utc/media-content/utc-media-filter-create.c +++ b/src/utc/media-content/utc-media-filter-create.c @@ -35,7 +35,6 @@ void utc_media_filter_create_cleanup(void) } } - /** * @testcase utc_media_filter_create_n * @since_tizen 2.3 @@ -51,7 +50,6 @@ int utc_media_filter_create_n(void) return 0; } - /** * @testcase utc_media_filter_create_p * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-filter-destroy.c b/src/utc/media-content/utc-media-filter-destroy.c index 8ef1ea122..f9ffb10ac 100755 --- a/src/utc/media-content/utc-media-filter-destroy.c +++ b/src/utc/media-content/utc-media-filter-destroy.c @@ -43,7 +43,6 @@ void utc_media_filter_destroy_startup(void) } } - /** * @function utc_media_filter_destroy_cleanup * @description Called after each test @@ -58,7 +57,6 @@ void utc_media_filter_destroy_cleanup(void) } } - /** * @testcase utc_media_filter_destroy_n * @since_tizen 2.3 @@ -76,7 +74,6 @@ int utc_media_filter_destroy_n(void) return 0; } - /** * @testcase utc_media_filter_destroy_p * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-filter.c b/src/utc/media-content/utc-media-filter.c index 8400a3868..0f53ea989 100755 --- a/src/utc/media-content/utc-media-filter.c +++ b/src/utc/media-content/utc-media-filter.c @@ -45,7 +45,6 @@ void utc_media_filter_startup(void) } - /** * @function utc_media_filter_cleanup * @description Called after each test @@ -58,7 +57,6 @@ void utc_media_filter_cleanup(void) g_filter = NULL; } - /** * @testcase utc_media_filter_set_offset_n * @since_tizen 2.3 @@ -76,7 +74,6 @@ int utc_media_filter_set_offset_n(void) return 0; } - /** * @testcase utc_media_filter_set_offset_p * @since_tizen 2.3 @@ -94,7 +91,6 @@ int utc_media_filter_set_offset_p(void) return 0; } - /** * @testcase utc_media_filter_set_condition_n * @since_tizen 2.3 @@ -112,7 +108,6 @@ int utc_media_filter_set_condition_n(void) return 0; } - /** * @testcase utc_media_filter_set_condition_p * @since_tizen 2.3 @@ -130,7 +125,6 @@ int utc_media_filter_set_condition_p(void) return 0; } - /** * @testcase utc_media_filter_set_order_n * @since_tizen 2.3 @@ -148,7 +142,6 @@ int utc_media_filter_set_order_n(void) return 0; } - /** * @testcase utc_media_filter_set_order_p * @since_tizen 2.3 @@ -184,7 +177,6 @@ int utc_media_filter_set_storage_n(void) return 0; } - /** * @testcase utc_media_filter_set_storage_p * @since_tizen 2.4 @@ -222,7 +214,6 @@ int utc_media_filter_get_offset_n(void) return 0; } - /** * @testcase utc_media_filter_get_offset_p * @since_tizen 2.3 @@ -242,7 +233,6 @@ int utc_media_filter_get_offset_p(void) return 0; } - /** * @testcase utc_media_filter_get_condition_n * @since_tizen 2.3 @@ -268,7 +258,6 @@ int utc_media_filter_get_condition_n(void) return 0; } - /** * @testcase utc_media_filter_get_condition_p * @since_tizen 2.3 @@ -288,8 +277,8 @@ int utc_media_filter_get_condition_p(void) ret = media_filter_get_condition(g_filter, &condition, &collate_type); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(condition != NULL) { - if(strcmp(condition, SET_TEST_CONDITION)) + if (condition != NULL) { + if (strcmp(condition, SET_TEST_CONDITION)) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; free(condition); @@ -300,7 +289,7 @@ int utc_media_filter_get_condition_p(void) assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(collate_type != MEDIA_CONTENT_COLLATE_NOCASE) + if (collate_type != MEDIA_CONTENT_COLLATE_NOCASE) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); @@ -308,7 +297,6 @@ int utc_media_filter_get_condition_p(void) return 0; } - /** * @testcase utc_media_filter_get_order_n * @since_tizen 2.3 @@ -325,7 +313,7 @@ int utc_media_filter_get_order_n(void) ret = media_filter_get_order(NULL, &order, &order_keyword, &collate_type); - if(order_keyword){ + if (order_keyword) { free(order_keyword); order_keyword = NULL; } @@ -335,7 +323,6 @@ int utc_media_filter_get_order_n(void) return 0; } - /** * @testcase utc_media_filter_get_order_p * @since_tizen 2.3 @@ -356,8 +343,8 @@ int utc_media_filter_get_order_p(void) ret = media_filter_get_order(g_filter, &order, &order_keyword, &collate_type); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(order_keyword != NULL) { - if(strcmp(order_keyword, MEDIA_TITLE)) + if (order_keyword != NULL) { + if (strcmp(order_keyword, MEDIA_TITLE)) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; free(order_keyword); @@ -368,12 +355,12 @@ int utc_media_filter_get_order_p(void) assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(order != MEDIA_CONTENT_ORDER_ASC) + if (order != MEDIA_CONTENT_ORDER_ASC) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(collate_type != MEDIA_CONTENT_COLLATE_DEFAULT) + if (collate_type != MEDIA_CONTENT_COLLATE_DEFAULT) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); @@ -395,7 +382,7 @@ int utc_media_filter_get_storage_n(void) ret = media_filter_get_storage(NULL, &storage_id); - if(storage_id) { + if (storage_id) { free(storage_id); storage_id = NULL; } @@ -405,7 +392,6 @@ int utc_media_filter_get_storage_n(void) return 0; } - /** * @testcase utc_media_filter_get_storage_p * @since_tizen 2.4 @@ -425,7 +411,7 @@ int utc_media_filter_get_storage_p(void) assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); if (storage_id != NULL) { - if(strcmp(storage_id, "media")) + if (strcmp(storage_id, "media")) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; free(storage_id); diff --git a/src/utc/media-content/utc-media-folder.c b/src/utc/media-content/utc-media-folder.c index c0edcd71b..fb7bbd0fb 100755 --- a/src/utc/media-content/utc-media-folder.c +++ b/src/utc/media-content/utc-media-folder.c @@ -26,7 +26,6 @@ #define TEST_SET_NAME "new_test" #define TEST_DEFAULT_NAME "test" - //& set: MediaFolder static media_folder_h g_folder = NULL; @@ -34,9 +33,9 @@ static media_folder_h g_test_folder = NULL; static filter_h g_filter = NULL; static char *g_folder_path = NULL; -static char* g_test_folder_path = NULL; -static char* g_default_folder_path = NULL; -static char* g_set_folder_path = NULL; +static char *g_test_folder_path = NULL; +static char *g_default_folder_path = NULL; +static char *g_set_folder_path = NULL; static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; @@ -44,16 +43,16 @@ static bool __storage_device_supported_cb(int storage_id, storage_type_e type, s { char temp[500]; if (type == STORAGE_TYPE_INTERNAL) { - memset(temp,0x00,sizeof(temp)); - snprintf(temp,sizeof(temp), "%s/%s",path, "res"); + memset(temp, 0x00, sizeof(temp)); + snprintf(temp, sizeof(temp), "%s/%s", path, "res"); g_default_folder_path = strdup(temp); - memset(temp,0x00,sizeof(temp)); - snprintf(temp,sizeof(temp), "%s/res/%s",path, TEST_SET_NAME); + memset(temp, 0x00, sizeof(temp)); + snprintf(temp, sizeof(temp), "%s/res/%s", path, TEST_SET_NAME); g_set_folder_path = strdup(temp); - memset(temp,0x00,sizeof(temp)); - snprintf(temp,sizeof(temp), "%s/%s",path, "res/test"); + memset(temp, 0x00, sizeof(temp)); + snprintf(temp, sizeof(temp), "%s/%s", path, "res/test"); g_test_folder_path = strdup(temp); return false; @@ -61,7 +60,6 @@ static bool __storage_device_supported_cb(int storage_id, storage_type_e type, s return true; } - static bool capi_folder_list_cb(media_folder_h folder, void *user_data) { int ret = MEDIA_CONTENT_ERROR_NONE; @@ -85,7 +83,7 @@ static bool capi_folder_list_cb(media_folder_h folder, void *user_data) } } - if (g_folder_path ) { + if (g_folder_path) { free(g_folder_path); g_folder_path = NULL; } @@ -129,7 +127,6 @@ void utc_media_folder_startup(void) } - /** * @function utc_media_folder_cleanup * @description Called after each test @@ -170,7 +167,6 @@ void utc_media_folder_cleanup(void) } } - /** * @testcase utc_media_folder_foreach_folder_from_db_n * @since_tizen 2.3 @@ -188,7 +184,6 @@ int utc_media_folder_foreach_folder_from_db_n(void) return 0; } - /** * @testcase utc_media_folder_foreach_folder_from_db_p * @since_tizen 2.3 @@ -222,7 +217,6 @@ int utc_media_folder_foreach_folder_from_db_p(void) return 0; } - /** * @testcase utc_media_folder_get_media_count_from_db_n * @since_tizen 2.3 @@ -241,7 +235,6 @@ int utc_media_folder_get_media_count_from_db_n(void) return 0; } - /** * @testcase utc_media_folder_get_media_count_from_db_p * @since_tizen 2.3 @@ -283,13 +276,11 @@ int utc_media_folder_get_media_count_from_db_p(void) return 0; } - static bool sub_media_cb(media_info_h media, void *user_data) { return true; } - /** * @testcase utc_media_folder_foreach_media_from_db_n * @since_tizen 2.3 @@ -321,7 +312,6 @@ int utc_media_folder_foreach_media_from_db_n(void) return 0; } - /** * @testcase utc_media_folder_foreach_media_from_db_p * @since_tizen 2.3 @@ -385,7 +375,6 @@ int utc_media_folder_clone_n(void) return 0; } - /** * @testcase utc_media_folder_clone_p * @since_tizen 2.3 @@ -410,7 +399,6 @@ int utc_media_folder_clone_p(void) return 0; } - /** * @testcase utc_media_folder_get_path_n * @since_tizen 2.3 @@ -434,7 +422,6 @@ int utc_media_folder_get_path_n(void) return 0; } - /** * @testcase utc_media_folder_get_path_p * @since_tizen 2.3 @@ -483,7 +470,6 @@ int utc_media_folder_get_name_n(void) return 0; } - /** * @testcase utc_media_folder_get_name_p * @since_tizen 2.3 @@ -508,7 +494,6 @@ int utc_media_folder_get_name_p(void) return 0; } - /** * @testcase utc_media_folder_get_storage_type_n * @since_tizen 2.3 @@ -527,7 +512,6 @@ int utc_media_folder_get_storage_type_n(void) return 0; } - /** * @testcase utc_media_folder_get_storage_type_p * @since_tizen 2.3 @@ -564,7 +548,6 @@ int utc_media_folder_get_storage_id_n(void) return 0; } - /** * @testcase utc_media_folder_get_storage_id_p * @since_tizen 2.4 @@ -605,7 +588,6 @@ int utc_media_folder_get_folder_id_n(void) return 0; } - /** * @testcase utc_media_folder_get_folder_id_p * @since_tizen 2.3 @@ -618,7 +600,7 @@ int utc_media_folder_get_folder_id_p(void) int ret = MEDIA_CONTENT_ERROR_NONE; char *folder_id = NULL; - ret = media_folder_get_folder_id(g_folder, &folder_id); + ret = media_folder_get_folder_id(g_folder, &folder_id); if (folder_id) { free(folder_id); @@ -630,7 +612,6 @@ int utc_media_folder_get_folder_id_p(void) return 0; } - /** * @testcase utc_media_folder_get_folder_from_db_n * @since_tizen 2.3 @@ -648,7 +629,6 @@ int utc_media_folder_get_folder_from_db_n(void) return 0; } - /** * @testcase utc_media_folder_get_folder_from_db_p * @since_tizen 2.3 @@ -683,7 +663,6 @@ int utc_media_folder_get_folder_from_db_p(void) return 0; } - /** * @testcase utc_media_folder_get_folder_count_from_db_n * @since_tizen 2.3 @@ -701,7 +680,6 @@ int utc_media_folder_get_folder_count_from_db_n(void) return 0; } - /** * @testcase utc_media_folder_get_folder_count_from_db_p * @since_tizen 2.3 @@ -732,7 +710,6 @@ int utc_media_folder_get_folder_count_from_db_p(void) return 0; } - /** * @testcase utc_media_folder_destroy_n * @since_tizen 2.3 @@ -750,7 +727,6 @@ int utc_media_folder_destroy_n(void) return 0; } - /** * @testcase utc_media_folder_destroy_p * @since_tizen 2.3 @@ -766,7 +742,8 @@ int utc_media_folder_destroy_p(void) ret = media_folder_destroy(g_folder); g_folder = NULL; assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - } else return -1; + } else + return -1; return 0; } diff --git a/src/utc/media-content/utc-media-group.c b/src/utc/media-content/utc-media-group.c index d373cf6ba..0e44eb1a5 100755 --- a/src/utc/media-content/utc-media-group.c +++ b/src/utc/media-content/utc-media-group.c @@ -37,7 +37,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return true; } - static bool album_cb(media_album_h album, void *user_data) { if (album != NULL) { @@ -48,13 +47,11 @@ static bool album_cb(media_album_h album, void *user_data) return false; } - static bool group_cb(const char *name, void *user_data) { return false; } - /** * @function utc_media_group_startup * @description Called before each test @@ -103,7 +100,6 @@ void utc_media_group_startup(void) } - /** * @function utc_media_group_cleanup * @description Called after each test @@ -153,7 +149,6 @@ void utc_media_group_cleanup(void) } - /** * @testcase utc_media_album_get_album_count_from_db_n * @since_tizen 2.3 @@ -171,7 +166,6 @@ int utc_media_album_get_album_count_from_db_n(void) return 0; } - /** * @testcase utc_media_album_get_album_count_from_db_p * @since_tizen 2.3 @@ -190,7 +184,6 @@ int utc_media_album_get_album_count_from_db_p(void) return 0; } - /** * @testcase utc_media_album_foreach_album_from_db_n * @since_tizen 2.3 @@ -208,7 +201,6 @@ int utc_media_album_foreach_album_from_db_n(void) return 0; } - /** * @testcase utc_media_album_foreach_album_from_db_p * @since_tizen 2.3 @@ -226,7 +218,6 @@ int utc_media_album_foreach_album_from_db_p(void) return 0; } - /** * @testcase utc_media_album_get_media_count_from_db_n * @since_tizen 2.3 @@ -245,7 +236,6 @@ int utc_media_album_get_media_count_from_db_n(void) return 0; } - /** * @testcase utc_media_album_get_media_count_from_db_p * @since_tizen 2.3 @@ -264,7 +254,6 @@ int utc_media_album_get_media_count_from_db_p(void) return 0; } - /** * @testcase utc_media_album_foreach_media_from_db_n * @since_tizen 2.3 @@ -282,7 +271,6 @@ int utc_media_album_foreach_media_from_db_n(void) return 0; } - /** * @testcase utc_media_album_foreach_media_from_db_p * @since_tizen 2.3 @@ -300,7 +288,6 @@ int utc_media_album_foreach_media_from_db_p(void) return 0; } - /** * @testcase utc_media_album_get_album_from_db_n * @since_tizen 2.3 @@ -318,7 +305,6 @@ int utc_media_album_get_album_from_db_n(void) return 0; } - /** * @testcase utc_media_album_get_album_from_db_p * @since_tizen 2.3 @@ -341,7 +327,6 @@ int utc_media_album_get_album_from_db_p(void) return 0; } - /** * @testcase utc_media_album_get_album_id_n * @since_tizen 2.3 @@ -359,7 +344,6 @@ int utc_media_album_get_album_id_n(void) return 0; } - /** * @testcase utc_media_album_get_album_id_p * @since_tizen 2.3 @@ -378,7 +362,6 @@ int utc_media_album_get_album_id_p(void) return 0; } - /** * @testcase utc_media_album_get_name_n * @since_tizen 2.3 @@ -396,7 +379,6 @@ int utc_media_album_get_name_n(void) return 0; } - /** * @testcase utc_media_album_get_name_p * @since_tizen 2.3 @@ -421,7 +403,6 @@ int utc_media_album_get_name_p(void) return 0; } - /** * @testcase utc_media_album_get_artist_n * @since_tizen 2.3 @@ -439,7 +420,6 @@ int utc_media_album_get_artist_n(void) return 0; } - /** * @testcase utc_media_album_get_artist_p * @since_tizen 2.3 @@ -464,7 +444,6 @@ int utc_media_album_get_artist_p(void) return 0; } - /** * @testcase utc_media_album_get_album_art_n * @since_tizen 2.3 @@ -482,7 +461,6 @@ int utc_media_album_get_album_art_n(void) return 0; } - /** * @testcase utc_media_album_get_album_art_p * @since_tizen 2.3 @@ -507,7 +485,6 @@ int utc_media_album_get_album_art_p(void) return 0; } - /** * @testcase utc_media_album_clone_n * @since_tizen 2.3 @@ -525,7 +502,6 @@ int utc_media_album_clone_n(void) return 0; } - /** * @testcase utc_media_album_clone_p * @since_tizen 2.3 @@ -546,7 +522,6 @@ int utc_media_album_clone_p(void) return 0; } - /** * @testcase utc_media_album_destroy_n * @since_tizen 2.3 @@ -564,7 +539,6 @@ int utc_media_album_destroy_n(void) return 0; } - /** * @testcase utc_media_album_destroy_p * @since_tizen 2.3 @@ -587,7 +561,6 @@ int utc_media_album_destroy_p(void) return 0; } - /** * @testcase utc_media_group_get_group_count_from_db_n * @since_tizen 2.3 @@ -605,7 +578,6 @@ int utc_media_group_get_group_count_from_db_n(void) return 0; } - /** * @testcase utc_media_group_get_group_count_from_db_p * @since_tizen 2.3 @@ -619,7 +591,7 @@ int utc_media_group_get_group_count_from_db_p(void) int group_count = 0; int idx = 0; - for(idx = 0; idx < MEDIA_CONTENT_GROUP_MAX; idx++) { + for (idx = 0; idx < MEDIA_CONTENT_GROUP_MAX; idx++) { ret = media_group_get_group_count_from_db(g_filter, idx, &group_count); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); } @@ -627,7 +599,6 @@ int utc_media_group_get_group_count_from_db_p(void) return 0; } - /** * @testcase utc_media_group_get_media_count_from_db_n * @since_tizen 2.3 @@ -645,7 +616,6 @@ int utc_media_group_get_media_count_from_db_n(void) return 0; } - /** * @testcase utc_media_group_get_media_count_from_db_p * @since_tizen 2.3 @@ -664,7 +634,6 @@ int utc_media_group_get_media_count_from_db_p(void) return 0; } - /** * @testcase utc_media_group_foreach_group_from_db_n * @since_tizen 2.3 @@ -682,7 +651,6 @@ int utc_media_group_foreach_group_from_db_n(void) return 0; } - /** * @testcase utc_media_group_foreach_group_from_db_p * @since_tizen 2.3 @@ -695,7 +663,7 @@ int utc_media_group_foreach_group_from_db_p(void) int ret = MEDIA_CONTENT_ERROR_NONE; int idx = 0; - for(idx = 0; idx < MEDIA_CONTENT_GROUP_MAX; idx++) { + for (idx = 0; idx < MEDIA_CONTENT_GROUP_MAX; idx++) { ret = media_group_foreach_group_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, group_cb, TEST_SET_GROUP_NAME); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); } @@ -703,7 +671,6 @@ int utc_media_group_foreach_group_from_db_p(void) return 0; } - /** * @testcase utc_media_group_foreach_media_from_db_n * @since_tizen 2.3 @@ -721,7 +688,6 @@ int utc_media_group_foreach_media_from_db_n(void) return 0; } - /** * @testcase utc_media_group_foreach_media_from_db_p * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-image.c b/src/utc/media-content/utc-media-image.c index 8a92da654..bdd483656 100755 --- a/src/utc/media-content/utc-media-image.c +++ b/src/utc/media-content/utc-media-image.c @@ -40,7 +40,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return true; } - /** * @function utc_media_image_startup * @description Called before each test @@ -57,8 +56,7 @@ void utc_media_image_startup(void) media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE; ret = media_content_connect(); - if (ret != MEDIA_CONTENT_ERROR_NONE) - { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_content_connect failed (code: %d)\n", ret); startup_ret = ret; @@ -70,8 +68,7 @@ void utc_media_image_startup(void) media_filter_create(&filter); media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT); media_filter_set_order(filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_DISPLAY_NAME, MEDIA_CONTENT_COLLATE_DEFAULT); - if (filter == NULL) - { + if (filter == NULL) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "filter is NULL"); startup_ret = ret; @@ -79,8 +76,7 @@ void utc_media_image_startup(void) } ret = media_info_foreach_media_from_db(filter, media_item_cb, NULL); - if (ret != MEDIA_CONTENT_ERROR_NONE) - { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, " media_info_foreach_media_from_db failed (code: %d)\n", ret); startup_ret = ret; @@ -90,7 +86,6 @@ void utc_media_image_startup(void) media_filter_destroy(filter); } - /** * @function utc_media_image_cleanup * @description Called after each test @@ -117,8 +112,6 @@ void utc_media_image_cleanup(void) media_content_disconnect(); } - - /** * @testcase utc_image_meta_destroy_n * @since_tizen 2.3 @@ -134,8 +127,6 @@ int utc_image_meta_destroy_n(void) return 0; } - - /** * @testcase utc_image_meta_destroy_p * @since_tizen 2.3 @@ -157,7 +148,6 @@ int utc_image_meta_destroy_p(void) return 0; } - /** * @testcase utc_image_meta_clone_n * @since_tizen 2.3 @@ -173,7 +163,6 @@ int utc_image_meta_clone_n(void) return 0; } - /** * @testcase utc_image_meta_clone_p * @since_tizen 2.3 @@ -189,7 +178,6 @@ int utc_image_meta_clone_p(void) return 0; } - /** * @testcase utc_image_meta_get_media_id_n * @since_tizen 2.3 @@ -212,7 +200,6 @@ int utc_image_meta_get_media_id_n(void) return 0; } - /** * @testcase utc_image_meta_get_media_id_p * @since_tizen 2.3 @@ -235,7 +222,6 @@ int utc_image_meta_get_media_id_p(void) return 0; } - /** * @testcase utc_image_meta_get_width_n * @since_tizen 2.3 @@ -252,7 +238,6 @@ int utc_image_meta_get_width_n(void) return 0; } - /** * @testcase utc_image_meta_get_width_p * @since_tizen 2.3 @@ -269,7 +254,6 @@ int utc_image_meta_get_width_p(void) return 0; } - /** * @testcase utc_image_meta_get_height_n * @since_tizen 2.3 @@ -286,7 +270,6 @@ int utc_image_meta_get_height_n(void) return 0; } - /** * @testcase utc_image_meta_get_height_p * @since_tizen 2.3 @@ -303,7 +286,6 @@ int utc_image_meta_get_height_p(void) return 0; } - /** * @testcase utc_image_meta_get_orientation_n * @since_tizen 2.3 @@ -320,7 +302,6 @@ int utc_image_meta_get_orientation_n(void) return 0; } - /** * @testcase utc_image_meta_get_orientation_p * @since_tizen 2.3 @@ -337,7 +318,6 @@ int utc_image_meta_get_orientation_p(void) return 0; } - /** * @testcase utc_image_meta_get_date_taken_n * @since_tizen 2.3 @@ -354,7 +334,6 @@ int utc_image_meta_get_date_taken_n(void) return 0; } - /** * @testcase utc_image_meta_get_date_taken_p * @since_tizen 2.3 @@ -376,7 +355,6 @@ int utc_image_meta_get_date_taken_p(void) return 0; } - /** * @testcase utc_image_meta_get_exposure_time_n * @since_tizen 2.4 @@ -393,7 +371,6 @@ int utc_image_meta_get_exposure_time_n(void) return 0; } - /** * @testcase utc_image_meta_get_exposure_time_p * @since_tizen 2.4 @@ -431,7 +408,6 @@ int utc_image_meta_get_fnumber_n(void) return 0; } - /** * @testcase utc_image_meta_get_fnumber_p * @since_tizen 2.4 @@ -464,7 +440,6 @@ int utc_image_meta_get_iso_n(void) return 0; } - /** * @testcase utc_image_meta_get_iso_p * @since_tizen 2.4 @@ -497,7 +472,6 @@ int utc_image_meta_get_model_n(void) return 0; } - /** * @testcase utc_image_meta_get_model_p * @since_tizen 2.4 diff --git a/src/utc/media-content/utc-media-info.c b/src/utc/media-content/utc-media-info.c index f8bb6f182..1b99ae66a 100755 --- a/src/utc/media-content/utc-media-info.c +++ b/src/utc/media-content/utc-media-info.c @@ -49,7 +49,6 @@ static const char *g_copy_dst_file = "image_copy.jpg"; static const char *g_audio_file = "sound.mp3"; static const char *g_insert_audio_file = "test_sound.mp3"; - static char *g_insert_path = NULL; static char *g_origin_path = NULL; static char *g_move_dst_path = NULL; @@ -71,44 +70,43 @@ static media_content_error_e g_cb_ret = MEDIA_CONTENT_ERROR_NONE; static bool g_isFaceRecognitionSupported = FALSE; - static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) { int i; - char temp[500] = {0, }; + char temp[500] = { 0, }; if (type == STORAGE_TYPE_INTERNAL) { - g_insert_path = (char*)malloc(strlen(path) + strlen(g_insert_file) + 6); - memset(g_insert_path,0x00,strlen(path) + strlen(g_insert_file) + 6); + g_insert_path = (char *)malloc(strlen(path) + strlen(g_insert_file) + 6); + memset(g_insert_path, 0x00, strlen(path) + strlen(g_insert_file) + 6); snprintf(g_insert_path, strlen(path) + strlen(g_insert_file) + 6, "%s/res/%s", path, g_insert_file); - g_origin_path = (char*)malloc(strlen(path) + strlen(g_origin_file) + 6); - memset(g_origin_path,0x00,strlen(path) + strlen(g_origin_file) + 6); + g_origin_path = (char *)malloc(strlen(path) + strlen(g_origin_file) + 6); + memset(g_origin_path, 0x00, strlen(path) + strlen(g_origin_file) + 6); snprintf(g_origin_path, strlen(path) + strlen(g_origin_file) + 6, "%s/res/%s", path, g_origin_file); - g_move_dst_path = (char*)malloc(strlen(path) + strlen(g_move_dst_file) + 6); - memset(g_move_dst_path,0x00,strlen(path) + strlen(g_move_dst_file) + 6); + g_move_dst_path = (char *)malloc(strlen(path) + strlen(g_move_dst_file) + 6); + memset(g_move_dst_path, 0x00, strlen(path) + strlen(g_move_dst_file) + 6); snprintf(g_move_dst_path, strlen(path) + strlen(g_move_dst_file) + 6, "%s/res/%s", path, g_move_dst_file); - g_copy_dst_path = (char*)malloc(strlen(path) + strlen(g_copy_dst_file) + 6); - memset(g_copy_dst_path,0x00,strlen(path) + strlen(g_copy_dst_file) + 6); + g_copy_dst_path = (char *)malloc(strlen(path) + strlen(g_copy_dst_file) + 6); + memset(g_copy_dst_path, 0x00, strlen(path) + strlen(g_copy_dst_file) + 6); snprintf(g_copy_dst_path, strlen(path) + strlen(g_copy_dst_file) + 6, "%s/res/%s", path, g_copy_dst_file); - g_audio_path = (char*)malloc(strlen(path) + strlen(g_audio_file) + 6); - memset(g_audio_path,0x00,strlen(path) + strlen(g_audio_file) + 6); + g_audio_path = (char *)malloc(strlen(path) + strlen(g_audio_file) + 6); + memset(g_audio_path, 0x00, strlen(path) + strlen(g_audio_file) + 6); snprintf(g_audio_path, strlen(path) + strlen(g_audio_file) + 6, "%s/res/%s", path, g_audio_file); - g_insert_audio_path = (char*)malloc(strlen(path) + strlen(g_insert_audio_file) + 6); - memset(g_insert_audio_path,0x00,strlen(path) + strlen(g_insert_audio_file) + 6); + g_insert_audio_path = (char *)malloc(strlen(path) + strlen(g_insert_audio_file) + 6); + memset(g_insert_audio_path, 0x00, strlen(path) + strlen(g_insert_audio_file) + 6); snprintf(g_insert_audio_path, strlen(path) + strlen(g_insert_audio_file) + 6, "%s/res/%s", path, g_insert_audio_file); for (i = 0; i < 3; i++) { - memset(temp,0x00, sizeof(temp)); - snprintf(temp, sizeof(temp), "%s/res/batch%02d.jpg", path,i); + memset(temp, 0x00, sizeof(temp)); + snprintf(temp, sizeof(temp), "%s/res/batch%02d.jpg", path, i); g_insert_path_list[i] = strndup(temp, sizeof(temp)); - memset(temp,0x00, sizeof(temp)); - snprintf(temp, sizeof(temp), "%s/res/burst%02d.jpg", path,i); + memset(temp, 0x00, sizeof(temp)); + snprintf(temp, sizeof(temp), "%s/res/burst%02d.jpg", path, i); g_burst_path_list[i] = strndup(temp, sizeof(temp)); } @@ -125,21 +123,21 @@ static bool sub_item_cb(media_info_h media, void *user_data) media_info_get_media_type(media, &type); media_info_get_display_name(media, &name); - if(g_item == NULL && g_strcmp0(name, g_insert_file) == 0) + if (g_item == NULL && g_strcmp0(name, g_insert_file) == 0) media_info_clone(&g_item, media); - if(g_item_sub == NULL && g_strcmp0(name, g_origin_file) == 0) { + if (g_item_sub == NULL && g_strcmp0(name, g_origin_file) == 0) { media_info_clone(&g_item_sub, media); if (!g_item_media_id) media_info_get_media_id(media, &g_item_media_id); } - if(g_vitem == NULL && type == MEDIA_CONTENT_TYPE_VIDEO) + if (g_vitem == NULL && type == MEDIA_CONTENT_TYPE_VIDEO) media_info_clone(&g_vitem, media); - else if(g_aitem == NULL && type == MEDIA_CONTENT_TYPE_MUSIC) + else if (g_aitem == NULL && type == MEDIA_CONTENT_TYPE_MUSIC) media_info_clone(&g_aitem, media); - else if(g_bitem == NULL && type == MEDIA_CONTENT_TYPE_BOOK) + else if (g_bitem == NULL && type == MEDIA_CONTENT_TYPE_BOOK) media_info_clone(&g_bitem, media); free(name); @@ -154,7 +152,7 @@ static bool foreach_cb(media_info_h media, void *user_data) media_info_get_media_id(media, &id); if (id != NULL) { if (!strcmp(id, g_inserted_media_id)) { - fprintf(stderr," file path : %s \n", id); + fprintf(stderr, " file path : %s \n", id); foreach_cb_result = MEDIA_CONTENT_ERROR_DB_FAILED; } free(id); @@ -196,8 +194,7 @@ void utc_media_info_startup(void) return; } - - char test_copy[256] = {0, }; + char test_copy[256] = { 0, }; snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path); system(test_copy); @@ -274,58 +271,57 @@ void utc_media_info_cleanup(void) media_content_disconnect(); - if(g_item_media_id){ + if (g_item_media_id) { free(g_item_media_id); g_item_media_id = NULL; } - if(g_inserted_media_id){ + if (g_inserted_media_id) { free(g_inserted_media_id); g_inserted_media_id = NULL; } - if(g_inserted_audio_id){ + if (g_inserted_audio_id) { free(g_inserted_audio_id); g_inserted_audio_id = NULL; } - if(g_filter){ + if (g_filter) { media_filter_destroy(g_filter); g_filter = NULL; } - if(g_insert_path != NULL) { + if (g_insert_path != NULL) { free(g_insert_path); g_insert_path = NULL; } - if(g_origin_path != NULL) { + if (g_origin_path != NULL) { free(g_origin_path); g_origin_path = NULL; } - if(g_move_dst_path != NULL) { + if (g_move_dst_path != NULL) { free(g_move_dst_path); g_move_dst_path = NULL; } - if(g_copy_dst_path != NULL) { + if (g_copy_dst_path != NULL) { free(g_copy_dst_path); g_copy_dst_path = NULL; } - if(g_audio_path != NULL) { + if (g_audio_path != NULL) { free(g_audio_path); g_audio_path = NULL; } - if(g_insert_audio_path != NULL) { + if (g_insert_audio_path != NULL) { free(g_insert_audio_path); g_insert_audio_path = NULL; } - for(i = 0; i < 3; i++) - { - if(g_burst_path_list[i]) { + for (i = 0; i < 3; i++) { + if (g_burst_path_list[i]) { free(g_burst_path_list[i]); g_burst_path_list[i] = NULL; } - if(g_insert_path_list[i]) { + if (g_insert_path_list[i]) { free(g_insert_path_list[i]); g_insert_path_list[i] = NULL; } @@ -378,7 +374,6 @@ int utc_media_info_insert_to_db_n(void) return 0; } - /** * @testcase utc_media_info_insert_to_db_p * @since_tizen 2.3 @@ -398,7 +393,6 @@ int utc_media_info_insert_to_db_p(void) return 0; } - static void _insert_batch_cb(media_content_error_e error, void *user_data) { insert_batch_cb_result = error; @@ -408,19 +402,18 @@ static void _insert_batch_cb(media_content_error_e error, void *user_data) static gboolean _insert_batch_start(gpointer data) { int ret = MEDIA_CONTENT_ERROR_NONE; - char test_copy[256] = {0, }; - int i = 0 ; + char test_copy[256] = { 0, }; + int i = 0; - for (i = 0; i < 3; i ++) { + for (i = 0; i < 3; i++) { memset(test_copy, 0x0, sizeof(test_copy)); snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path_list[i]); ret = system(test_copy); } - ret = media_info_insert_batch_to_db(g_insert_path_list, sizeof(g_insert_path_list)/ sizeof(*g_insert_path_list), _insert_batch_cb, NULL); - if (ret < 0) - { + ret = media_info_insert_batch_to_db(g_insert_path_list, sizeof(g_insert_path_list) / sizeof(*g_insert_path_list), _insert_batch_cb, NULL); + if (ret < 0) { g_main_loop_quit(g_loop); insert_batch_cb_result = ret; } @@ -428,7 +421,6 @@ static gboolean _insert_batch_start(gpointer data) return false; } - /** * @testcase utc_media_info_insert_batch_to_db_n * @since_tizen 2.3 @@ -446,7 +438,6 @@ int utc_media_info_insert_batch_to_db_n(void) return 0; } - /** * @testcase utc_media_info_insert_batch_to_db_p * @since_tizen 2.3 @@ -464,8 +455,8 @@ int utc_media_info_insert_batch_to_db_p(void) g_loop = g_main_loop_new(NULL, FALSE); context = g_main_loop_get_context(g_loop); source = g_idle_source_new(); - g_source_set_callback (source, _insert_batch_start, NULL, NULL); - g_source_attach (source, context); + g_source_set_callback(source, _insert_batch_start, NULL, NULL); + g_source_attach(source, context); g_main_loop_run(g_loop); g_main_loop_unref(g_loop); @@ -479,7 +470,6 @@ int utc_media_info_insert_batch_to_db_p(void) return 0; } - /** * @testcase utc_media_info_set_favorite_n * @since_tizen 2.3 @@ -505,11 +495,11 @@ static bool _favorite_cb(media_info_h media, void *user_data) media_info_get_file_path(media, &path); - if(path){ - if(strcmp(path, g_insert_path) == 0) { + if (path) { + if (strcmp(path, g_insert_path) == 0) { media_info_get_favorite(media, &fav); - if(fav == false) + if (fav == false) g_cb_ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; else g_cb_ret = MEDIA_CONTENT_ERROR_NONE; @@ -530,7 +520,6 @@ static bool _favorite_cb(media_info_h media, void *user_data) return true; } - /** * @testcase utc_media_info_set_favorite_p * @since_tizen 2.3 @@ -557,7 +546,6 @@ int utc_media_info_set_favorite_p(void) return 0; } - /** * @testcase utc_media_info_update_to_db_n * @since_tizen 2.3 @@ -575,7 +563,6 @@ int utc_media_info_update_to_db_n(void) return 0; } - /** * @testcase utc_media_info_update_to_db_p * @since_tizen 2.3 @@ -593,7 +580,6 @@ int utc_media_info_update_to_db_p(void) return 0; } - static void thumb_cb(media_content_error_e error, const char *path, void *user_data) { thumb_cb_result = error; @@ -638,7 +624,6 @@ static gboolean _create_cancel_thumbnail_start(gpointer data) return false; } - /** * @testcase utc_media_info_create_thumbnail_n * @since_tizen 2.3 @@ -656,7 +641,6 @@ int utc_media_info_create_thumbnail_n(void) return 0; } - /** * @testcase utc_media_info_create_thumbnail_p * @since_tizen 2.3 @@ -674,8 +658,8 @@ int utc_media_info_create_thumbnail_p(void) g_loop = g_main_loop_new(NULL, FALSE); context = g_main_loop_get_context(g_loop); source = g_idle_source_new(); - g_source_set_callback (source, _create_thumbnail_start, NULL, NULL); - g_source_attach (source, context); + g_source_set_callback(source, _create_thumbnail_start, NULL, NULL); + g_source_attach(source, context); g_main_loop_run(g_loop); g_main_loop_unref(g_loop); @@ -709,7 +693,6 @@ static gboolean _face_detection_start(gpointer data) return false; } - /** * @testcase utc_media_info_start_face_detection_n * @since_tizen 3.0 @@ -731,7 +714,6 @@ int utc_media_info_start_face_detection_n(void) return 0; } - /** * @testcase utc_media_info_start_face_detection_p * @since_tizen 3.0 @@ -747,8 +729,8 @@ int utc_media_info_start_face_detection_p(void) g_loop = g_main_loop_new(NULL, FALSE); context = g_main_loop_get_context(g_loop); source = g_idle_source_new(); - g_source_set_callback (source, _face_detection_start, NULL, NULL); - g_source_attach (source, context); + g_source_set_callback(source, _face_detection_start, NULL, NULL); + g_source_attach(source, context); g_main_loop_run(g_loop); g_main_loop_unref(g_loop); @@ -764,7 +746,6 @@ int utc_media_info_start_face_detection_p(void) return 0; } - /** * @testcase utc_media_info_move_to_db_n * @since_tizen 2.3 @@ -782,7 +763,6 @@ int utc_media_info_move_to_db_n(void) return 0; } - /** * @testcase utc_media_info_move_to_db_p * @since_tizen 2.3 @@ -794,7 +774,7 @@ int utc_media_info_move_to_db_p(void) assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); int ret = MEDIA_CONTENT_ERROR_NONE; - char test_copy[256] = {0, }; + char test_copy[256] = { 0, }; snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_move_dst_path); @@ -806,14 +786,13 @@ int utc_media_info_move_to_db_p(void) ret = media_info_delete_from_db(g_inserted_media_id); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - free (m_id); + free(m_id); unlink(g_move_dst_path); return 0; } - /** * @testcase utc_media_info_delete_from_db_n * @since_tizen 2.3 @@ -831,7 +810,6 @@ int utc_media_info_delete_from_db_n(void) return 0; } - /** * @testcase utc_media_info_delete_from_db_p * @since_tizen 2.3 @@ -856,7 +834,6 @@ int utc_media_info_delete_from_db_p(void) return 0; } - /** * @testcase utc_media_info_foreach_media_from_db_n * @since_tizen 2.3 @@ -874,7 +851,7 @@ int utc_media_info_foreach_media_from_db_n(void) ret = media_info_foreach_media_from_db(NULL, NULL, NULL); - if(filter){ + if (filter) { media_filter_destroy(filter); filter = NULL; } @@ -884,7 +861,6 @@ int utc_media_info_foreach_media_from_db_n(void) return 0; } - /** * @testcase utc_media_info_foreach_media_from_db_p * @since_tizen 2.3 @@ -904,7 +880,7 @@ int utc_media_info_foreach_media_from_db_p(void) ret = media_info_foreach_media_from_db(filter, sub_item_cb, NULL); - if(filter){ + if (filter) { media_filter_destroy(filter); filter = NULL; } @@ -914,7 +890,6 @@ int utc_media_info_foreach_media_from_db_p(void) return 0; } - /** * @testcase utc_media_info_destroy_n * @since_tizen 2.3 @@ -932,7 +907,6 @@ int utc_media_info_destroy_n(void) return 0; } - /** * @testcase utc_media_info_destroy_p * @since_tizen 2.3 @@ -951,7 +925,6 @@ int utc_media_info_destroy_p(void) return 0; } - /** * @testcase utc_media_info_clone_n * @since_tizen 2.3 @@ -970,7 +943,6 @@ int utc_media_info_clone_n(void) return 0; } - /** * @testcase utc_media_info_clone_p * @since_tizen 2.3 @@ -992,7 +964,6 @@ int utc_media_info_clone_p(void) return 0; } - /** * @testcase utc_media_info_get_media_id_n * @since_tizen 2.3 @@ -1007,7 +978,7 @@ int utc_media_info_get_media_id_n(void) ret = media_info_get_media_id(NULL, &media_id); - if(media_id){ + if (media_id) { free(media_id); media_id = NULL; } @@ -1017,7 +988,6 @@ int utc_media_info_get_media_id_n(void) return 0; } - /** * @testcase utc_media_info_get_media_id_p * @since_tizen 2.3 @@ -1031,7 +1001,7 @@ int utc_media_info_get_media_id_p(void) char *media_id = NULL; ret = media_info_get_media_id(g_item, &media_id); - if(media_id){ + if (media_id) { free(media_id); media_id = NULL; } @@ -1041,7 +1011,6 @@ int utc_media_info_get_media_id_p(void) return 0; } - /** * @testcase utc_media_info_get_file_path_n * @since_tizen 2.3 @@ -1056,7 +1025,7 @@ int utc_media_info_get_file_path_n(void) ret = media_info_get_file_path(NULL, &path); - if(path){ + if (path) { free(path); path = NULL; } @@ -1066,7 +1035,6 @@ int utc_media_info_get_file_path_n(void) return 0; } - /** * @testcase utc_media_info_get_file_path_p * @since_tizen 2.3 @@ -1081,7 +1049,7 @@ int utc_media_info_get_file_path_p(void) ret = media_info_get_file_path(g_item, &path); - if(path){ + if (path) { free(path); path = NULL; } @@ -1091,7 +1059,6 @@ int utc_media_info_get_file_path_p(void) return 0; } - /** * @testcase utc_media_info_get_display_name_n * @since_tizen 2.3 @@ -1106,7 +1073,7 @@ int utc_media_info_get_display_name_n(void) ret = media_info_get_display_name(NULL, &name); - if(name){ + if (name) { free(name); name = NULL; } @@ -1116,7 +1083,6 @@ int utc_media_info_get_display_name_n(void) return 0; } - /** * @testcase utc_media_info_get_display_name_p * @since_tizen 2.3 @@ -1131,7 +1097,7 @@ int utc_media_info_get_display_name_p(void) ret = media_info_get_display_name(g_item, &name); - if(name){ + if (name) { free(name); name = NULL; } @@ -1141,7 +1107,6 @@ int utc_media_info_get_display_name_p(void) return 0; } - /** * @testcase utc_media_info_get_media_type_n * @since_tizen 2.3 @@ -1160,7 +1125,6 @@ int utc_media_info_get_media_type_n(void) return 0; } - /** * @testcase utc_media_info_get_media_type_p * @since_tizen 2.3 @@ -1179,7 +1143,6 @@ int utc_media_info_get_media_type_p(void) return 0; } - /** * @testcase utc_media_info_get_mime_type_n * @since_tizen 2.3 @@ -1194,7 +1157,7 @@ int utc_media_info_get_mime_type_n(void) ret = media_info_get_mime_type(NULL, &mime_type); - if(mime_type){ + if (mime_type) { free(mime_type); mime_type = NULL; } @@ -1204,7 +1167,6 @@ int utc_media_info_get_mime_type_n(void) return 0; } - /** * @testcase utc_media_info_get_mime_type_p * @since_tizen 2.3 @@ -1218,7 +1180,7 @@ int utc_media_info_get_mime_type_p(void) char *mime_type = NULL; ret = media_info_get_mime_type(g_item, &mime_type); - if(mime_type){ + if (mime_type) { free(mime_type); mime_type = NULL; } @@ -1228,7 +1190,6 @@ int utc_media_info_get_mime_type_p(void) return 0; } - /** * @testcase utc_media_info_get_thumbnail_path_n * @since_tizen 2.3 @@ -1243,7 +1204,7 @@ int utc_media_info_get_thumbnail_path_n(void) ret = media_info_get_thumbnail_path(NULL, &thumbnail_path); - if(thumbnail_path){ + if (thumbnail_path) { free(thumbnail_path); thumbnail_path = NULL; } @@ -1253,7 +1214,6 @@ int utc_media_info_get_thumbnail_path_n(void) return 0; } - /** * @testcase utc_media_info_get_thumbnail_path_p * @since_tizen 2.3 @@ -1268,7 +1228,7 @@ int utc_media_info_get_thumbnail_path_p(void) ret = media_info_get_thumbnail_path(g_item, &thumbnail_path); - if(thumbnail_path){ + if (thumbnail_path) { free(thumbnail_path); thumbnail_path = NULL; } @@ -1278,7 +1238,6 @@ int utc_media_info_get_thumbnail_path_p(void) return 0; } - /** * @testcase utc_media_info_get_modified_time_n * @since_tizen 2.3 @@ -1297,7 +1256,6 @@ int utc_media_info_get_modified_time_n(void) return 0; } - /** * @testcase utc_media_info_get_modified_time_p * @since_tizen 2.3 @@ -1316,7 +1274,6 @@ int utc_media_info_get_modified_time_p(void) return 0; } - /** * @testcase utc_media_info_get_size_n * @since_tizen 2.3 @@ -1335,7 +1292,6 @@ int utc_media_info_get_size_n(void) return 0; } - /** * @testcase utc_media_info_get_size_p * @since_tizen 2.3 @@ -1354,7 +1310,6 @@ int utc_media_info_get_size_p(void) return 0; } - /** * @testcase utc_media_info_get_storage_type_n * @since_tizen 2.3 @@ -1373,7 +1328,6 @@ int utc_media_info_get_storage_type_n(void) return 0; } - /** * @testcase utc_media_info_get_storage_type_p * @since_tizen 2.3 @@ -1410,7 +1364,6 @@ int utc_media_info_get_storage_id_n(void) return 0; } - /** * @testcase utc_media_info_get_storage_id_p * @since_tizen 2.4 @@ -1425,7 +1378,7 @@ int utc_media_info_get_storage_id_p(void) ret = media_info_get_storage_id(g_item, &storage_id); - if(storage_id) { + if (storage_id) { free(storage_id); storage_id = NULL; } @@ -1453,7 +1406,6 @@ int utc_media_info_is_drm_n(void) return 0; } - /** * @testcase utc_media_info_is_drm_p * @since_tizen 2.3 @@ -1467,7 +1419,7 @@ int utc_media_info_is_drm_p(void) bool is_drm = false; ret = media_info_is_drm(g_item, &is_drm); - if(is_drm) + if (is_drm) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); @@ -1475,7 +1427,6 @@ int utc_media_info_is_drm_p(void) return 0; } - /** * @testcase utc_media_info_get_altitude_n * @since_tizen 2.3 @@ -1494,7 +1445,6 @@ int utc_media_info_get_altitude_n(void) return 0; } - /** * @testcase utc_media_info_get_altitude_p * @since_tizen 2.3 @@ -1513,7 +1463,6 @@ int utc_media_info_get_altitude_p(void) return 0; } - /** * @testcase utc_media_info_get_latitude_n * @since_tizen 2.3 @@ -1532,7 +1481,6 @@ int utc_media_info_get_latitude_n(void) return 0; } - /** * @testcase utc_media_info_get_latitude_p * @since_tizen 2.3 @@ -1551,7 +1499,6 @@ int utc_media_info_get_latitude_p(void) return 0; } - /** * @testcase utc_media_info_get_longitude_n * @since_tizen 2.3 @@ -1570,7 +1517,6 @@ int utc_media_info_get_longitude_n(void) return 0; } - /** * @testcase utc_media_info_get_longitude_p * @since_tizen 2.3 @@ -1589,7 +1535,6 @@ int utc_media_info_get_longitude_p(void) return 0; } - /** * @testcase utc_media_info_get_description_n * @since_tizen 2.3 @@ -1600,11 +1545,11 @@ int utc_media_info_get_description_n(void) assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); int ret = MEDIA_CONTENT_ERROR_NONE; - char *description=NULL; + char *description = NULL; ret = media_info_get_description(NULL, &description); - if(description){ + if (description) { free(description); description = NULL; } @@ -1614,7 +1559,6 @@ int utc_media_info_get_description_n(void) return 0; } - /** * @testcase utc_media_info_get_description_p * @since_tizen 2.3 @@ -1629,7 +1573,7 @@ int utc_media_info_get_description_p(void) ret = media_info_get_description(g_item, &description); - if(description){ + if (description) { free(description); description = NULL; } @@ -1639,7 +1583,6 @@ int utc_media_info_get_description_p(void) return 0; } - /** * @testcase utc_media_info_get_rating_n * @since_tizen 2.3 @@ -1658,7 +1601,6 @@ int utc_media_info_get_rating_n(void) return 0; } - /** * @testcase utc_media_info_get_rating_p * @since_tizen 2.3 @@ -1677,7 +1619,6 @@ int utc_media_info_get_rating_p(void) return 0; } - /** * @testcase utc_media_info_get_added_time_n * @since_tizen 2.3 @@ -1696,7 +1637,6 @@ int utc_media_info_get_added_time_n(void) return 0; } - /** * @testcase utc_media_info_get_added_time_p * @since_tizen 2.3 @@ -1715,7 +1655,6 @@ int utc_media_info_get_added_time_p(void) return 0; } - /** * @testcase utc_media_info_get_favorite_n * @since_tizen 2.3 @@ -1734,7 +1673,6 @@ int utc_media_info_get_favorite_n(void) return 0; } - /** * @testcase utc_media_info_get_favorite_p * @since_tizen 2.3 @@ -1767,7 +1705,7 @@ int utc_media_info_get_media_from_db_n(void) ret = media_info_get_media_from_db(NULL, &media); - if(media){ + if (media) { media_info_destroy(media); media = NULL; } @@ -1777,7 +1715,6 @@ int utc_media_info_get_media_from_db_n(void) return 0; } - /** * @testcase utc_media_info_get_media_from_db_p * @since_tizen 2.3 @@ -1792,7 +1729,7 @@ int utc_media_info_get_media_from_db_p(void) ret = media_info_get_media_from_db(g_item_media_id, &media); - if(media){ + if (media) { media_info_destroy(media); media = NULL; } @@ -1802,7 +1739,6 @@ int utc_media_info_get_media_from_db_p(void) return 0; } - /** * @testcase utc_media_info_get_media_from_db_by_path_n * @since_tizen 6.5 @@ -1820,7 +1756,6 @@ int utc_media_info_get_media_from_db_by_path_n(void) return 0; } - /** * @testcase utc_media_info_get_media_from_db_by_path_p * @since_tizen 6.5 @@ -1842,7 +1777,6 @@ int utc_media_info_get_media_from_db_by_path_p(void) return 0; } - /** * @testcase utc_media_info_get_image_n * @since_tizen 2.3 @@ -1857,7 +1791,7 @@ int utc_media_info_get_image_n(void) ret = media_info_get_image(NULL, &image); - if(image){ + if (image) { image_meta_destroy(image); image = NULL; } @@ -1867,7 +1801,6 @@ int utc_media_info_get_image_n(void) return 0; } - /** * @testcase utc_media_info_get_image_p * @since_tizen 2.3 @@ -1882,7 +1815,7 @@ int utc_media_info_get_image_p(void) ret = media_info_get_image(g_item, &image); - if(image){ + if (image) { image_meta_destroy(image); image = NULL; } @@ -1892,7 +1825,6 @@ int utc_media_info_get_image_p(void) return 0; } - /** * @testcase utc_media_info_get_video_n * @since_tizen 2.3 @@ -1907,7 +1839,7 @@ int utc_media_info_get_video_n(void) ret = media_info_get_video(NULL, &video); - if(video){ + if (video) { video_meta_destroy(video); video = NULL; } @@ -1917,7 +1849,6 @@ int utc_media_info_get_video_n(void) return 0; } - /** * @testcase utc_media_info_get_video_p * @since_tizen 2.3 @@ -1932,7 +1863,7 @@ int utc_media_info_get_video_p(void) ret = media_info_get_video(g_vitem, &video); - if(video){ + if (video) { video_meta_destroy(video); video = NULL; } @@ -1942,7 +1873,6 @@ int utc_media_info_get_video_p(void) return 0; } - /** * @testcase utc_media_info_get_audio_n * @since_tizen 2.3 @@ -1957,7 +1887,7 @@ int utc_media_info_get_audio_n(void) ret = media_info_get_audio(NULL, &audio); - if(audio){ + if (audio) { audio_meta_destroy(audio); audio = NULL; } @@ -1967,7 +1897,6 @@ int utc_media_info_get_audio_n(void) return 0; } - /** * @testcase utc_media_info_get_audio_p * @since_tizen 2.3 @@ -1982,7 +1911,7 @@ int utc_media_info_get_audio_p(void) ret = media_info_get_audio(g_aitem, &audio); - if(audio){ + if (audio) { audio_meta_destroy(audio); audio = NULL; } @@ -2014,7 +1943,6 @@ int utc_media_info_get_book_n(void) return 0; } - /** * @testcase utc_media_info_get_book_p * @since_tizen 6.5 @@ -2029,7 +1957,7 @@ int utc_media_info_get_book_p(void) ret = media_info_get_book(g_bitem, &book); - if(book){ + if (book) { book_meta_destroy(book); book = NULL; } @@ -2039,32 +1967,27 @@ int utc_media_info_get_book_p(void) return 0; } - static bool sub_tag_cb(media_tag_h tag, void *user_data) { char *name = NULL; - if(tag) - { + if (tag) { media_tag_get_name(tag, &name); } return false; } - static bool sub_bookmark_cb(media_bookmark_h bookmark, void *user_data) { int bm_id; - if(bookmark) - { + if (bookmark) { media_bookmark_get_bookmark_id(bookmark, &bm_id); } return false; } - /** * @testcase utc_media_info_foreach_tag_from_db_n * @since_tizen 2.3 @@ -2083,7 +2006,6 @@ int utc_media_info_foreach_tag_from_db_n(void) return 0; } - /** * @testcase utc_media_info_foreach_tag_from_db_p * @since_tizen 2.3 @@ -2106,7 +2028,6 @@ int utc_media_info_foreach_tag_from_db_p(void) return 0; } - /** * @testcase utc_media_info_foreach_bookmark_from_db_n * @since_tizen 2.3 @@ -2125,7 +2046,6 @@ int utc_media_info_foreach_bookmark_from_db_n(void) return 0; } - /** * @testcase utc_media_info_foreach_bookmark_from_db_p * @since_tizen 2.3 @@ -2138,7 +2058,7 @@ int utc_media_info_foreach_bookmark_from_db_p(void) int ret = MEDIA_CONTENT_ERROR_NONE; filter_h filter = NULL; - ret=media_filter_create(&filter); + ret = media_filter_create(&filter); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); ret = media_info_foreach_bookmark_from_db(g_item_media_id, filter, sub_bookmark_cb, NULL); @@ -2149,7 +2069,6 @@ int utc_media_info_foreach_bookmark_from_db_p(void) return 0; } - /** * @testcase utc_media_info_get_bookmark_count_from_db_n * @since_tizen 2.3 @@ -2169,7 +2088,6 @@ int utc_media_info_get_bookmark_count_from_db_n(void) return 0; } - /** * @testcase utc_media_info_get_bookmark_count_from_db_p * @since_tizen 2.3 @@ -2188,7 +2106,7 @@ int utc_media_info_get_bookmark_count_from_db_p(void) ret = media_info_get_bookmark_count_from_db(g_item_media_id, filter, &count); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(filter){ + if (filter) { media_filter_destroy(filter); filter = NULL; } @@ -2196,7 +2114,6 @@ int utc_media_info_get_bookmark_count_from_db_p(void) return 0; } - /** * @testcase utc_media_info_get_media_count_from_db_n * @since_tizen 2.3 @@ -2215,7 +2132,6 @@ int utc_media_info_get_media_count_from_db_n(void) return 0; } - /** * @testcase utc_media_info_get_media_count_from_db_p * @since_tizen 2.3 @@ -2234,7 +2150,7 @@ int utc_media_info_get_media_count_from_db_p(void) ret = media_info_get_media_count_from_db(filter, &count); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(filter){ + if (filter) { media_filter_destroy(filter); filter = NULL; } @@ -2242,7 +2158,6 @@ int utc_media_info_get_media_count_from_db_p(void) return 0; } - /** * @testcase utc_media_info_get_tag_count_from_db_n * @since_tizen 2.3 @@ -2262,7 +2177,6 @@ int utc_media_info_get_tag_count_from_db_n(void) return 0; } - /** * @testcase utc_media_info_get_tag_count_from_db_p * @since_tizen 2.3 @@ -2281,7 +2195,7 @@ int utc_media_info_get_tag_count_from_db_p(void) ret = media_info_get_tag_count_from_db(g_item_media_id, filter, &count); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(filter){ + if (filter) { media_filter_destroy(filter); filter = NULL; } @@ -2289,7 +2203,6 @@ int utc_media_info_get_tag_count_from_db_p(void) return 0; } - /** * @testcase utc_media_info_get_timeline_n * @since_tizen 2.3 @@ -2307,7 +2220,6 @@ int utc_media_info_get_timeline_n(void) return 0; } - /** * @testcase utc_media_info_get_timeline_p * @since_tizen 2.3 @@ -2326,7 +2238,6 @@ int utc_media_info_get_timeline_p(void) return 0; } - /** * @testcase utc_media_info_get_title_n * @since_tizen 2.3 @@ -2344,7 +2255,6 @@ int utc_media_info_get_title_n(void) return 0; } - /** * @testcase utc_media_info_get_title_p * @since_tizen 2.3 @@ -2354,12 +2264,12 @@ int utc_media_info_get_title_p(void) { assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - char* title = NULL; + char *title = NULL; int ret = MEDIA_CONTENT_ERROR_NONE; ret = media_info_get_title(g_item, &title); - if(title){ + if (title) { free(title); title = NULL; } @@ -2386,7 +2296,6 @@ int utc_media_info_is_360_content_n(void) return 0; } - /** * @testcase utc_media_info_is_360_content_p * @since_tizen 2.3 @@ -2405,7 +2314,6 @@ int utc_media_info_is_360_content_p(void) return 0; } - /** * @testcase utc_media_info_cancel_thumbnail_n * @since_tizen 2.3 @@ -2423,7 +2331,6 @@ int utc_media_info_cancel_thumbnail_n(void) return 0; } - /** * @testcase utc_media_info_cancel_thumbnail_p * @since_tizen 2.3 @@ -2441,8 +2348,8 @@ int utc_media_info_cancel_thumbnail_p(void) g_loop = g_main_loop_new(NULL, FALSE); context = g_main_loop_get_context(g_loop); source = g_idle_source_new(); - g_source_set_callback (source, _create_cancel_thumbnail_start, NULL, NULL); - g_source_attach (source, context); + g_source_set_callback(source, _create_cancel_thumbnail_start, NULL, NULL); + g_source_attach(source, context); g_main_loop_run(g_loop); g_main_loop_unref(g_loop); @@ -2477,7 +2384,6 @@ int utc_media_info_cancel_face_detection_n(void) return 0; } - /** * @testcase utc_media_info_cancel_face_detection_p * @since_tizen 3.0 @@ -2525,7 +2431,6 @@ int utc_media_info_get_face_count_from_db_n(void) return 0; } - /** * @testcase utc_media_info_get_face_count_from_db_p * @since_tizen 3.0 @@ -2544,7 +2449,7 @@ int utc_media_info_get_face_count_from_db_p(void) ret = media_info_get_face_count_from_db(g_item_media_id, filter, &count); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(filter){ + if (filter) { media_filter_destroy(filter); filter = NULL; } @@ -2586,7 +2491,6 @@ int utc_media_info_foreach_face_from_db_n(void) return 0; } - /** * @testcase utc_media_info_foreach_face_from_db_p * @since_tizen 3.0 @@ -2604,7 +2508,7 @@ int utc_media_info_foreach_face_from_db_p(void) ret = media_info_foreach_face_from_db(g_item_media_id, filter, face_cb, NULL); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(filter){ + if (filter) { media_filter_destroy(filter); filter = NULL; } @@ -2612,7 +2516,6 @@ int utc_media_info_foreach_face_from_db_p(void) return 0; } - /** * @testcase utc_media_info_generate_thumbnail_n * @since_tizen 5.0 @@ -2630,7 +2533,6 @@ int utc_media_info_generate_thumbnail_n(void) return 0; } - /** * @testcase utc_media_info_generate_thumbnail_p * @since_tizen 5.0 @@ -2656,4 +2558,4 @@ int utc_media_info_generate_thumbnail_p(void) assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); return 0; -} \ No newline at end of file +} diff --git a/src/utc/media-content/utc-media-playlist.c b/src/utc/media-content/utc-media-playlist.c index 78c850e2b..4eb10de2a 100755 --- a/src/utc/media-content/utc-media-playlist.c +++ b/src/utc/media-content/utc-media-playlist.c @@ -45,21 +45,21 @@ static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE; static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data) { - if(type == STORAGE_TYPE_INTERNAL) { - img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6); - memset(img_path,0x00,strlen(path) + strlen(img_file) + 6); + if (type == STORAGE_TYPE_INTERNAL) { + img_path = (char *)malloc(strlen(path) + strlen(img_file) + 6); + memset(img_path, 0x00, strlen(path) + strlen(img_file) + 6); snprintf(img_path, strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file); - playlist_path = (char*)malloc(strlen(path) + strlen(playlist_file) + 6); - memset(playlist_path,0x00,strlen(path) + strlen(playlist_file) + 6); + playlist_path = (char *)malloc(strlen(path) + strlen(playlist_file) + 6); + memset(playlist_path, 0x00, strlen(path) + strlen(playlist_file) + 6); snprintf(playlist_path, strlen(path) + strlen(playlist_file) + 6, "%s/res/%s", path, playlist_file); - create_path = (char*)malloc(strlen(path) + strlen(create_file) + 6); - memset(create_path,0x00,strlen(path) + strlen(create_file) + 6); + create_path = (char *)malloc(strlen(path) + strlen(create_file) + 6); + memset(create_path, 0x00, strlen(path) + strlen(create_file) + 6); snprintf(create_path, strlen(path) + strlen(create_file) + 6, "%s/res/%s", path, create_file); - copy_path = (char*)malloc(strlen(path) + strlen(copy_file) + 6); - memset(copy_path,0x00,strlen(path) + strlen(copy_file) + 6); + copy_path = (char *)malloc(strlen(path) + strlen(copy_file) + 6); + memset(copy_path, 0x00, strlen(path) + strlen(copy_file) + 6); snprintf(copy_path, strlen(path) + strlen(copy_file) + 6, "%s/res/%s", path, copy_file); return false; } @@ -72,7 +72,7 @@ static bool media_item_cb(media_info_h media, void *user_data) ret = media_info_get_media_id(media, &g_media_id); - if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL)) { + if ((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL)) { fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret); return false; @@ -81,33 +81,30 @@ static bool media_item_cb(media_info_h media, void *user_data) return true; } - static bool playlist_item_cb(int playlist_member_id, media_info_h media, void *user_data) { - fprintf(stderr,"member id: %d", playlist_member_id); + fprintf(stderr, "member id: %d", playlist_member_id); g_playlist_member_id = playlist_member_id; return true; } - static bool playlist_cb(media_playlist_h playlist, void *user_data) { int playlist_id = 0; char *name = NULL; - if(playlist != NULL) { + if (playlist != NULL) { media_playlist_get_playlist_id(g_playlist, &playlist_id); media_playlist_get_name(g_playlist, &name); } - if(name) { + if (name) { free(name); name = NULL; } return true; } - /** * @function utc_media_playlist_startup * @description Called before each test @@ -119,13 +116,12 @@ void utc_media_playlist_startup(void) /* start of TC */ media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE; - if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) - { + if (storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); } ret = media_content_connect(); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_content_connect failed (code: %d)\n", ret); startup_ret = ret; @@ -137,7 +133,7 @@ void utc_media_playlist_startup(void) media_filter_create(&g_filter); media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT); - if(g_filter == NULL) { + if (g_filter == NULL) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "g_filter is NULL"); startup_ret = ret; @@ -145,19 +141,18 @@ void utc_media_playlist_startup(void) } ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_info_foreach_media_from_db failed (code: %d)\n", ret); startup_ret = ret; return; } - //media_playlist_get_playlist_id(g_playlist, &g_playlist_id); //media_playlist_delete_from_db(g_playlist_id); // to check if the same date has been already inserted ret = media_playlist_insert_to_db(TEST_SET_PLAYLIST_SUB_1, &g_playlist); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_playlist_insert_to_db failed (code: %d)\n", ret); startup_ret = ret; @@ -165,18 +160,18 @@ void utc_media_playlist_startup(void) } ret = media_playlist_get_playlist_id(g_playlist, &g_playlist_id); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_playlist_get_playlist_id failed (code: %d)\n", ret); startup_ret = ret; return; } - char test_copy[256] = {0, }; + char test_copy[256] = { 0, }; snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", create_path, copy_path); ret = system(test_copy); - if(ret != MEDIA_CONTENT_ERROR_NONE) { + if (ret != MEDIA_CONTENT_ERROR_NONE) { fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__); fprintf(stderr, "media_playlist_get_playlist_id failed (code: %d)\n", ret); startup_ret = ret; @@ -184,7 +179,6 @@ void utc_media_playlist_startup(void) } } - /** * @function utc_media_playlist_cleanup * @description Called after each test @@ -230,7 +224,6 @@ void utc_media_playlist_cleanup(void) } } - /** * @testcase utc_media_playlist_insert_to_db_n * @since_tizen 2.3 @@ -248,7 +241,6 @@ int utc_media_playlist_insert_to_db_n(void) return 0; } - /** * @testcase utc_media_playlist_insert_to_db_p * @since_tizen 2.3 @@ -275,7 +267,7 @@ int utc_media_playlist_insert_to_db_p(void) ret = media_playlist_get_name(g_playlist, &name); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(strcmp(name, TEST_SET_PLAYLIST_SUB_2) == 0) + if (strcmp(name, TEST_SET_PLAYLIST_SUB_2) == 0) ret = MEDIA_CONTENT_ERROR_NONE; else ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; @@ -295,7 +287,6 @@ int utc_media_playlist_insert_to_db_p(void) return 0; } - /** * @testcase utc_media_playlist_delete_from_db_n * @since_tizen 2.3 @@ -313,7 +304,6 @@ int utc_media_playlist_delete_from_db_n(void) return 0; } - /** * @testcase utc_media_playlist_delete_from_db_p * @since_tizen 2.3 @@ -331,7 +321,6 @@ int utc_media_playlist_delete_from_db_p(void) return 0; } - /** * @testcase utc_media_playlist_get_playlist_count_from_db_n * @since_tizen 2.3 @@ -349,7 +338,6 @@ int utc_media_playlist_get_playlist_count_from_db_n(void) return 0; } - /** * @testcase utc_media_playlist_get_playlist_count_from_db_p * @since_tizen 2.3 @@ -368,7 +356,6 @@ int utc_media_playlist_get_playlist_count_from_db_p(void) return 0; } - /** * @testcase utc_media_playlist_foreach_playlist_from_db_n * @since_tizen 2.3 @@ -386,7 +373,6 @@ int utc_media_playlist_foreach_playlist_from_db_n(void) return 0; } - /** * @testcase utc_media_playlist_foreach_playlist_from_db_p * @since_tizen 2.3 @@ -404,7 +390,6 @@ int utc_media_playlist_foreach_playlist_from_db_p(void) return 0; } - /** * @testcase utc_media_playlist_get_media_count_from_db_n * @since_tizen 2.3 @@ -422,7 +407,6 @@ int utc_media_playlist_get_media_count_from_db_n(void) return 0; } - /** * @testcase utc_media_playlist_get_media_count_from_db_p * @since_tizen 2.3 @@ -441,7 +425,6 @@ int utc_media_playlist_get_media_count_from_db_p(void) return 0; } - /** * @testcase utc_media_playlist_foreach_media_from_db_n * @since_tizen 2.3 @@ -459,7 +442,6 @@ int utc_media_playlist_foreach_media_from_db_n(void) return 0; } - /** * @testcase utc_media_playlist_foreach_media_from_db_p * @since_tizen 2.3 @@ -477,7 +459,6 @@ int utc_media_playlist_foreach_media_from_db_p(void) return 0; } - /** * @testcase utc_media_playlist_destroy_n * @since_tizen 2.3 @@ -495,7 +476,6 @@ int utc_media_playlist_destroy_n(void) return 0; } - /** * @testcase utc_media_playlist_destroy_p * @since_tizen 2.3 @@ -518,7 +498,6 @@ int utc_media_playlist_destroy_p(void) return 0; } - /** * @testcase utc_media_playlist_clone_n * @since_tizen 2.3 @@ -536,7 +515,6 @@ int utc_media_playlist_clone_n(void) return 0; } - /** * @testcase utc_media_playlist_clone_p * @since_tizen 2.3 @@ -553,14 +531,14 @@ int utc_media_playlist_clone_p(void) ret = media_playlist_clone(&g_playlist_dst, g_playlist); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - ret = media_playlist_get_name(g_playlist,&org_name); + ret = media_playlist_get_name(g_playlist, &org_name); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - ret = media_playlist_get_name(g_playlist_dst,&dst_name); + ret = media_playlist_get_name(g_playlist_dst, &dst_name); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); if (org_name != NULL && dst_name != NULL) { - if(strcmp(org_name, dst_name)) + if (strcmp(org_name, dst_name)) ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; free(org_name); @@ -580,7 +558,6 @@ int utc_media_playlist_clone_p(void) return 0; } - /** * @testcase utc_media_playlist_get_playlist_from_db_n * @since_tizen 2.3 @@ -599,7 +576,6 @@ int utc_media_playlist_get_playlist_from_db_n(void) return 0; } - /** * @testcase utc_media_playlist_get_playlist_from_db_p * @since_tizen 2.3 @@ -623,7 +599,6 @@ int utc_media_playlist_get_playlist_from_db_p(void) return 0; } - /** * @testcase utc_media_playlist_get_playlist_id_n * @since_tizen 2.3 @@ -641,7 +616,6 @@ int utc_media_playlist_get_playlist_id_n(void) return 0; } - /** * @testcase utc_media_playlist_get_playlist_id_p * @since_tizen 2.3 @@ -660,7 +634,6 @@ int utc_media_playlist_get_playlist_id_p(void) return 0; } - /** * @testcase utc_media_playlist_get_name_n * @since_tizen 2.3 @@ -685,7 +658,6 @@ int utc_media_playlist_get_name_n(void) return 0; } - /** * @testcase utc_media_playlist_get_name_p * @since_tizen 2.3 @@ -710,7 +682,6 @@ int utc_media_playlist_get_name_p(void) return 0; } - /** * @testcase utc_media_playlist_get_play_order_n * @since_tizen 2.3 @@ -728,7 +699,6 @@ int utc_media_playlist_get_play_order_n(void) return 0; } - /** * @testcase utc_media_playlist_get_play_order_p * @since_tizen 2.3 @@ -747,7 +717,6 @@ int utc_media_playlist_get_play_order_p(void) return 0; } - /** * @testcase utc_media_playlist_update_to_db_n * @since_tizen 2.3 @@ -765,7 +734,6 @@ int utc_media_playlist_update_to_db_n(void) return 0; } - /** * @testcase utc_media_playlist_update_to_db_p * @since_tizen 2.3 @@ -783,7 +751,6 @@ int utc_media_playlist_update_to_db_p(void) return 0; } - /** * @testcase utc_media_playlist_set_name_n * @since_tizen 2.3 @@ -809,14 +776,14 @@ static bool _set_name_cb(media_playlist_h playlist, void *user_data) ret = media_playlist_get_playlist_id(playlist, &playlist_id); - if(playlist_id == g_playlist_id) { + if (playlist_id == g_playlist_id) { ret = media_playlist_get_name(playlist, &name); - if(strcmp(name, "myPlaylist") != 0) + if (strcmp(name, "myPlaylist") != 0) ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; } - if(name){ + if (name) { free(name); name = NULL; } @@ -865,7 +832,6 @@ int utc_media_playlist_add_media_n(void) return 0; } - /** * @testcase utc_media_playlist_add_media_p * @since_tizen 2.3 @@ -891,7 +857,7 @@ int utc_media_playlist_add_media_p(void) ret = media_playlist_get_media_count_from_db(playlist_id, g_filter, &media_count); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - if(media_count > 0) + if (media_count > 0) ret = MEDIA_CONTENT_ERROR_NONE; else ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION; @@ -900,7 +866,6 @@ int utc_media_playlist_add_media_p(void) return 0; } - /** * @testcase utc_media_playlist_set_play_order_n * @since_tizen 2.3 @@ -926,10 +891,10 @@ static bool _set_play_order_cb(media_playlist_h playlist, void *user_data) ret = media_playlist_get_playlist_id(playlist, &playlist_id); - if(playlist_id == g_playlist_id) { + if (playlist_id == g_playlist_id) { ret = media_playlist_get_play_order(playlist, g_playlist_member_id, &playlist_order); - if(playlist_order != 1) + if (playlist_order != 1) ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; } @@ -953,7 +918,7 @@ int utc_media_playlist_set_play_order_p(void) media_playlist_update_to_db(g_playlist); media_playlist_foreach_media_from_db(g_playlist_id, g_filter, playlist_item_cb, NULL); - fprintf(stderr,"member id: %d", g_playlist_member_id); + fprintf(stderr, "member id: %d", g_playlist_member_id); ret = media_playlist_set_play_order(g_playlist, g_playlist_member_id, 1); media_playlist_update_to_db(g_playlist); @@ -981,7 +946,6 @@ int utc_media_playlist_remove_media_n(void) return 0; } - /** * @testcase utc_media_playlist_remove_media_p * @since_tizen 2.3 @@ -1002,7 +966,7 @@ int utc_media_playlist_remove_media_p(void) ret = media_playlist_foreach_media_from_db(g_playlist_id, g_filter, playlist_item_cb, NULL); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); - fprintf(stderr,"member id: %d", g_playlist_member_id); + fprintf(stderr, "member id: %d", g_playlist_member_id); ret = media_playlist_remove_media(g_playlist, g_playlist_member_id); assert_eq(ret, MEDIA_CONTENT_ERROR_NONE); @@ -1014,7 +978,6 @@ int utc_media_playlist_remove_media_p(void) return 0; } - /** * @testcase utc_media_playlist_get_thumbnail_path_n * @since_tizen 2.3 @@ -1032,7 +995,6 @@ int utc_media_playlist_get_thumbnail_path_n(void) return 0; } - /** * @testcase utc_media_playlist_get_thumbnail_path_p * @since_tizen 2.3 @@ -1042,7 +1004,7 @@ int utc_media_playlist_get_thumbnail_path_p(void) { assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE); - char* thumbnail_path = NULL; + char *thumbnail_path = NULL; int ret = MEDIA_CONTENT_ERROR_NONE; ret = media_playlist_get_thumbnail_path(g_playlist, &thumbnail_path); @@ -1057,7 +1019,6 @@ int utc_media_playlist_get_thumbnail_path_p(void) return 0; } - /** * @testcase utc_media_playlist_set_thumbnail_path_n * @since_tizen 2.3 @@ -1145,7 +1106,6 @@ int utc_media_playlist_import_from_file_n(void) return 0; } - /** * @testcase utc_media_playlist_import_from_file_p * @since_tizen 2.4 @@ -1170,7 +1130,7 @@ int utc_media_playlist_import_from_file_p(void) ret = media_playlist_import_from_file(copy_path, TEST_SET_PLAYLIST_SUB_3, &playlist); - if(playlist != NULL) { + if (playlist != NULL) { media_playlist_get_playlist_id(playlist, &playlist_id); media_playlist_delete_from_db(playlist_id); media_playlist_destroy(playlist); @@ -1200,7 +1160,6 @@ int utc_media_playlist_export_to_file_n(void) return 0; } - /** * @testcase utc_media_playlist_export_to_file_p * @since_tizen 2.4 diff --git a/src/utc/media-content/utc-media-storage.c b/src/utc/media-content/utc-media-storage.c index 77fe7e2c8..3fc559c5b 100755 --- a/src/utc/media-content/utc-media-storage.c +++ b/src/utc/media-content/utc-media-storage.c @@ -74,28 +74,27 @@ static bool _media_storage_cb(media_storage_h storage, void *user_data) goto MEDIA_STORAGE_CB_FAIL; if (storage_path) { - free(storage_path); - storage_path = NULL; + free(storage_path); + storage_path = NULL; } return true; -MEDIA_STORAGE_CB_FAIL: + MEDIA_STORAGE_CB_FAIL: if (g_storage) { - media_storage_destroy(g_storage); - g_storage = NULL; + media_storage_destroy(g_storage); + g_storage = NULL; } if (g_storage_id) { - free(g_storage_id); - g_storage_id = NULL; + free(g_storage_id); + g_storage_id = NULL; } if (storage_path) { - free(storage_path); - storage_path = NULL; + free(storage_path); + storage_path = NULL; } return false; } - /** * @function utc_media_storage_startup * @description Called before each test @@ -155,7 +154,6 @@ void utc_media_storage_startup(void) } } - /** * @function utc_media_storage_cleanup * @description Called after each test @@ -218,7 +216,6 @@ int utc_media_storage_get_storage_info_from_db_p(void) return 0; } - /** * @testcase utc_media_storage_get_storage_count_from_db_n * @since_tizen 2.4 @@ -394,7 +391,6 @@ int utc_media_storage_destroy_n(void) return 0; } - /** * @testcase utc_media_storage_destroy_p * @since_tizen 2.4 @@ -417,7 +413,6 @@ int utc_media_storage_destroy_p(void) return 0; } - /** * @testcase utc_media_storage_clone_n * @since_tizen 2.4 @@ -435,7 +430,6 @@ int utc_media_storage_clone_n(void) return 0; } - /** * @testcase utc_media_storage_clone_p * @since_tizen 2.4 @@ -458,7 +452,6 @@ int utc_media_storage_clone_p(void) return 0; } - /** * @testcase utc_media_storage_get_id_n * @since_tizen 2.4 @@ -482,7 +475,6 @@ int utc_media_storage_get_id_n(void) return 0; } - /** * @testcase utc_media_storage_get_id_p * @since_tizen 2.4 @@ -529,7 +521,6 @@ int utc_media_storage_get_path_n(void) return 0; } - /** * @testcase utc_media_storage_get_path_p * @since_tizen 2.4 @@ -573,7 +564,6 @@ int utc_media_storage_get_type_n(void) return 0; } - /** * @testcase utc_media_storage_get_type_p * @since_tizen 2.4 diff --git a/src/utc/media-content/utc-media-tag.c b/src/utc/media-content/utc-media-tag.c index ddf1a5d72..45f9506be 100755 --- a/src/utc/media-content/utc-media-tag.c +++ b/src/utc/media-content/utc-media-tag.c @@ -56,7 +56,7 @@ void utc_media_tag_startup(void) g_tag = NULL; g_tag_dst = NULL; - media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE; + media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE; ret = media_content_connect(); if (ret != MEDIA_CONTENT_ERROR_NONE) { @@ -85,7 +85,6 @@ void utc_media_tag_startup(void) startup_ret = ret; return; } - // test if the same data already has been inserted ret = media_tag_insert_to_db(tag_name, &g_tag); if (ret != MEDIA_CONTENT_ERROR_NONE) { @@ -129,7 +128,6 @@ void utc_media_tag_cleanup(void) media_content_disconnect(); } - static bool tag_cb(media_tag_h tag, void *user_data) { char *name = NULL; @@ -137,8 +135,8 @@ static bool tag_cb(media_tag_h tag, void *user_data) if (tag != NULL) { media_tag_get_name(tag, &name); - if (name != NULL && strcmp(name, tag_name) == 0) { - fprintf(stderr," tag name : %s \n", name); + if (name != NULL && strcmp(name, tag_name) == 0) { + fprintf(stderr, " tag name : %s \n", name); free(name); } } @@ -146,7 +144,6 @@ static bool tag_cb(media_tag_h tag, void *user_data) return true; } - /** * @testcase utc_media_tag_insert_to_db_n * @since_tizen 2.3 @@ -164,7 +161,6 @@ int utc_media_tag_insert_to_db_n(void) return 0; } - /** * @testcase utc_media_tag_insert_to_db_p * @since_tizen 2.3 @@ -196,7 +192,6 @@ int utc_media_tag_insert_to_db_p(void) return 0; } - /** * @testcase utc_media_tag_delete_from_db_n * @since_tizen 2.3 @@ -214,7 +209,6 @@ int utc_media_tag_delete_from_db_n(void) return 0; } - /** * @testcase utc_media_tag_delete_from_db_p * @since_tizen 2.3 @@ -232,7 +226,6 @@ int utc_media_tag_delete_from_db_p(void) return 0; } - /** * @testcase utc_media_tag_get_tag_count_from_db_n * @since_tizen 2.3 @@ -249,6 +242,7 @@ int utc_media_tag_get_tag_count_from_db_n(void) return 0; } + /** * @testcase utc_media_tag_get_tag_count_from_db_p * @since_tizen 2.3 @@ -267,7 +261,6 @@ int utc_media_tag_get_tag_count_from_db_p(void) return 0; } - /** * @testcase utc_media_tag_foreach_tag_from_db_n * @since_tizen 2.3 @@ -285,7 +278,6 @@ int utc_media_tag_foreach_tag_from_db_n(void) return 0; } - /** * @testcase utc_media_tag_foreach_tag_from_db_p * @since_tizen 2.3 @@ -321,7 +313,6 @@ int utc_media_tag_foreach_tag_from_db_p(void) return 0; } - /** * @testcase utc_media_tag_get_media_count_from_db_n * @since_tizen 2.3 @@ -339,7 +330,6 @@ int utc_media_tag_get_media_count_from_db_n(void) return 0; } - /** * @testcase utc_media_tag_get_media_count_from_db_p * @since_tizen 2.3 @@ -358,7 +348,6 @@ int utc_media_tag_get_media_count_from_db_p(void) return 0; } - /** * @testcase utc_media_tag_foreach_media_from_db_n * @since_tizen 2.3 @@ -376,7 +365,6 @@ int utc_media_tag_foreach_media_from_db_n(void) return 0; } - /** * @testcase utc_media_tag_foreach_media_from_db_p * @since_tizen 2.3 @@ -394,7 +382,6 @@ int utc_media_tag_foreach_media_from_db_p(void) return 0; } - /** * @testcase utc_media_tag_clone_n * @since_tizen 2.3 @@ -412,7 +399,6 @@ int utc_media_tag_clone_n(void) return 0; } - /** * @testcase utc_media_tag_clone_p * @since_tizen 2.3 @@ -435,7 +421,6 @@ int utc_media_tag_clone_p(void) return 0; } - /** * @testcase utc_media_tag_update_to_db_n * @since_tizen 2.3 @@ -453,7 +438,6 @@ int utc_media_tag_update_to_db_n(void) return 0; } - /** * @testcase utc_media_tag_update_to_db_p * @since_tizen 2.3 @@ -471,7 +455,6 @@ int utc_media_tag_update_to_db_p(void) return 0; } - /** * @testcase utc_media_tag_add_media_n * @since_tizen 2.3 @@ -489,7 +472,6 @@ int utc_media_tag_add_media_n(void) return 0; } - /** * @testcase utc_media_tag_add_media_p * @since_tizen 2.3 @@ -509,7 +491,6 @@ int utc_media_tag_add_media_p(void) return 0; } - /** * @testcase utc_media_tag_remove_media_n * @since_tizen 2.3 @@ -527,7 +508,6 @@ int utc_media_tag_remove_media_n(void) return 0; } - /** * @testcase utc_media_tag_remove_media_p * @since_tizen 2.3 @@ -547,7 +527,6 @@ int utc_media_tag_remove_media_p(void) return 0; } - /** * @testcase utc_media_tag_set_name_n * @since_tizen 2.3 @@ -612,7 +591,6 @@ int utc_media_tag_set_name_p(void) return 0; } - /** * @testcase utc_media_tag_get_tag_id_n * @since_tizen 2.3 @@ -631,7 +609,6 @@ int utc_media_tag_get_tag_id_n(void) return 0; } - /** * @testcase utc_media_tag_get_tag_id_p * @since_tizen 2.3 @@ -650,7 +627,6 @@ int utc_media_tag_get_tag_id_p(void) return 0; } - /** * @testcase utc_media_tag_get_name_n * @since_tizen 2.3 @@ -669,7 +645,6 @@ int utc_media_tag_get_name_n(void) return 0; } - /** * @testcase utc_media_tag_get_name_p * @since_tizen 2.3 @@ -694,7 +669,6 @@ int utc_media_tag_get_name_p(void) return 0; } - /** * @testcase utc_media_tag_get_tag_from_db_n * @since_tizen 2.3 @@ -713,7 +687,6 @@ int utc_media_tag_get_tag_from_db_n(void) return 0; } - /** * @testcase utc_media_tag_get_tag_from_db_p * @since_tizen 2.3 @@ -738,7 +711,6 @@ int utc_media_tag_get_tag_from_db_p(void) return 0; } - /** * @testcase utc_media_tag_destroy_n * @since_tizen 2.3 @@ -756,7 +728,6 @@ int utc_media_tag_destroy_n(void) return 0; } - /** * @testcase utc_media_tag_destroy_p * @since_tizen 2.3 diff --git a/src/utc/media-content/utc-media-video.c b/src/utc/media-content/utc-media-video.c index 507e7c9a2..1cdf577ff 100755 --- a/src/utc/media-content/utc-media-video.c +++ b/src/utc/media-content/utc-media-video.c @@ -48,7 +48,6 @@ static bool media_item_cb(media_info_h media, void *user_data) return true; } - /** * @function utc_media_video_startup * @description Called before each test @@ -92,7 +91,6 @@ void utc_media_video_startup(void) } } - /** * @function utc_media_video_cleanup * @description Called after each test @@ -112,7 +110,7 @@ void utc_media_video_cleanup(void) g_video = NULL; } - if (g_video_dst!= NULL) { + if (g_video_dst != NULL) { video_meta_destroy(g_video_dst); g_video_dst = NULL; } @@ -125,8 +123,6 @@ void utc_media_video_cleanup(void) media_content_disconnect(); } - - /** * @testcase utc_video_meta_destroy_n * @since_tizen 2.3 @@ -142,8 +138,6 @@ int utc_video_meta_destroy_n(void) return 0; } - - /** * @testcase utc_video_meta_destroy_p * @since_tizen 2.3 @@ -163,7 +157,6 @@ int utc_video_meta_destroy_p(void) return 0; } - /** * @testcase utc_video_meta_clone_n * @since_tizen 2.3 @@ -179,7 +172,6 @@ int utc_video_meta_clone_n(void) return 0; } - /** * @testcase utc_video_meta_clone_p * @since_tizen 2.3 @@ -195,7 +187,6 @@ int utc_video_meta_clone_p(void) return 0; } - /** * @testcase utc_video_meta_get_media_id_n * @since_tizen 2.3 @@ -218,7 +209,6 @@ int utc_video_meta_get_media_id_n(void) return 0; } - /** * @testcase utc_video_meta_get_media_id_p * @since_tizen 2.3 @@ -241,7 +231,6 @@ int utc_video_meta_get_media_id_p(void) return 0; } - /** * @testcase utc_video_meta_get_album_n * @since_tizen 2.3 @@ -264,7 +253,6 @@ int utc_video_meta_get_album_n(void) return 0; } - /** * @testcase utc_video_meta_get_album_p * @since_tizen 2.3 @@ -287,7 +275,6 @@ int utc_video_meta_get_album_p(void) return 0; } - /** * @testcase utc_video_meta_get_artist_n * @since_tizen 2.3 @@ -310,7 +297,6 @@ int utc_video_meta_get_artist_n(void) return 0; } - /** * @testcase utc_video_meta_get_artist_p * @since_tizen 2.3 @@ -333,7 +319,6 @@ int utc_video_meta_get_artist_p(void) return 0; } - /** * @testcase utc_video_meta_get_album_artist_n * @since_tizen 2.3 @@ -356,7 +341,6 @@ int utc_video_meta_get_album_artist_n(void) return 0; } - /** * @testcase utc_video_meta_get_album_artist_p * @since_tizen 2.3 @@ -379,7 +363,6 @@ int utc_video_meta_get_album_artist_p(void) return 0; } - /** * @testcase utc_video_meta_get_genre_n * @since_tizen 2.3 @@ -402,8 +385,6 @@ int utc_video_meta_get_genre_n(void) return 0; } - - /** * @testcase utc_video_meta_get_genre_p * @since_tizen 2.3 @@ -426,7 +407,6 @@ int utc_video_meta_get_genre_p(void) return 0; } - /** * @testcase utc_video_meta_get_composer_n * @since_tizen 2.3 @@ -449,7 +429,6 @@ int utc_video_meta_get_composer_n(void) return 0; } - /** * @testcase utc_video_meta_get_composer_p * @since_tizen 2.3 @@ -472,7 +451,6 @@ int utc_video_meta_get_composer_p(void) return 0; } - /** * @testcase utc_video_meta_get_year_n * @since_tizen 2.3 @@ -495,8 +473,6 @@ int utc_video_meta_get_year_n(void) return 0; } - - /** * @testcase utc_video_meta_get_year_p * @since_tizen 2.3 @@ -519,7 +495,6 @@ int utc_video_meta_get_year_p(void) return 0; } - /** * @testcase utc_video_meta_get_recorded_date_n * @since_tizen 2.3 @@ -542,7 +517,6 @@ int utc_video_meta_get_recorded_date_n(void) return 0; } - /** * @testcase utc_video_meta_get_recorded_date_p * @since_tizen 2.3 @@ -565,7 +539,6 @@ int utc_video_meta_get_recorded_date_p(void) return 0; } - /** * @testcase utc_video_meta_get_copyright_n * @since_tizen 2.3 @@ -588,7 +561,6 @@ int utc_video_meta_get_copyright_n(void) return 0; } - /** * @testcase utc_video_meta_get_copyright_p * @since_tizen 2.3 @@ -611,7 +583,6 @@ int utc_video_meta_get_copyright_p(void) return 0; } - /** * @testcase utc_video_meta_get_track_num_n * @since_tizen 2.3 @@ -634,7 +605,6 @@ int utc_video_meta_get_track_num_n(void) return 0; } - /** * @testcase utc_video_meta_get_track_num_p * @since_tizen 2.3 @@ -657,7 +627,6 @@ int utc_video_meta_get_track_num_p(void) return 0; } - /** * @testcase utc_video_meta_get_bit_rate_n * @since_tizen 2.3 @@ -674,7 +643,6 @@ int utc_video_meta_get_bit_rate_n(void) return 0; } - /** * @testcase utc_video_meta_get_bit_rate_p * @since_tizen 2.3 @@ -691,7 +659,6 @@ int utc_video_meta_get_bit_rate_p(void) return 0; } - /** * @testcase utc_video_meta_get_duration_n * @since_tizen 2.3 @@ -708,7 +675,6 @@ int utc_video_meta_get_duration_n(void) return 0; } - /** * @testcase utc_video_meta_get_duration_p * @since_tizen 2.3 @@ -725,7 +691,6 @@ int utc_video_meta_get_duration_p(void) return 0; } - /** * @testcase utc_video_meta_get_width_n * @since_tizen 2.3 @@ -742,7 +707,6 @@ int utc_video_meta_get_width_n(void) return 0; } - /** * @testcase utc_video_meta_get_width_p * @since_tizen 2.3 @@ -759,7 +723,6 @@ int utc_video_meta_get_width_p(void) return 0; } - /** * @testcase utc_video_meta_get_height_n * @since_tizen 2.3 @@ -776,7 +739,6 @@ int utc_video_meta_get_height_n(void) return 0; } - /** * @testcase utc_video_meta_get_height_p * @since_tizen 2.3 @@ -809,7 +771,6 @@ int utc_video_meta_get_rotation_n(void) return 0; } - /** * @testcase utc_video_meta_get_rotation_p * @since_tizen 4.0 @@ -826,4 +787,3 @@ int utc_video_meta_get_rotation_p(void) return 0; } -