}
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
AppendPaths(g_szInternalStoragePath, TESTAUDIO, g_szAudioPath);
nRet = media_content_scan_file(g_szAudioPath);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
g_CallBackHit = false;
*/
void ITs_media_content_album_cleanup(void)
{
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_album_destroy(g_hAlbum);
media_content_disconnect();
//& type: auto
int ITc_media_album_get_album_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_album_get_album_count_from_db(NULL, &nCount);
//& type: auto
int ITc_media_album_foreach_album_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_album_destroy(g_hAlbum);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_album_destroy", MediaContentGetError(nRet));
//& type: auto
int ITc_media_album_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_album_h hAlbum = NULL;
int nRet = media_album_clone(&hAlbum, g_hAlbum);
//& type: auto
int ITc_media_album_get_album_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nAlbumId = -1;
int nRet = media_album_get_album_id(g_hAlbum, &nAlbumId);
//& type: auto
int ITc_media_album_get_media_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nAlbumId = -1;
int nRet = media_album_get_album_id(g_hAlbum, &nAlbumId);
//& type: auto
int ITc_media_album_foreach_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nAlbumId = -1;
int nRet = media_album_get_album_id(g_hAlbum, &nAlbumId);
//& type: auto
int ITc_media_album_get_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAlbumInfo = NULL;
int nRet = media_album_get_name(g_hAlbum, &pszAlbumInfo);
//& type: auto
int ITc_media_album_get_artist_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAlbumInfo = NULL;
int nRet = media_album_get_artist(g_hAlbum, &pszAlbumInfo);
//& type: auto
int ITc_media_album_get_album_art_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAlbumInfo = NULL;
int nRet = media_album_get_album_art(g_hAlbum, &pszAlbumInfo);
//& type: auto
int ITc_media_album_get_album_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nAlbumId = -1;
int nRet = media_album_get_album_id(g_hAlbum, &nAlbumId);
char *pszMediaId = NULL;
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
PRINT_RESULTNONE_CLEANUP(0, nRet, "GetFolderPath", "Return Value Not Correct", media_content_disconnect());
AppendPaths(g_szAudioFolder, TESTAUDIO, g_szAudioPath);
nRet = media_info_insert_to_db(g_szAudioPath, &g_hAudioInfo);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
nRet = media_info_get_media_id(g_hAudioInfo, &pszMediaId);
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
media_info_delete_from_db(g_szAudioId);
media_info_destroy(g_hAudioInfo);
}
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_content_disconnect();
}
//& type: auto
int ITc_audio_meta_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
audio_meta_h hAudioMeta = NULL;
int nRet = audio_meta_clone(&hAudioMeta, g_hAudioMeta);
//& type: auto
int ITc_audio_meta_set_get_played_count_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nSetPlayedCount = 4;
int nGetPlayedCount = 1;
//& type: auto
int ITc_audio_meta_set_get_played_position_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nSetPlayedPosition = 4;
int nGetPlayedPosition = 1;
//& type: auto
int ITc_audio_meta_set_get_played_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stGetTime = {0};
time_t stSetTime = {0};
//& type: auto
int ITc_audio_meta_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = audio_meta_update_to_db(g_hAudioMeta);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "audio_meta_update_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_audio_meta_get_album_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAlbum = NULL;
int nRet = audio_meta_get_album(g_hAudioMeta, &pszAlbum);
//& type: auto
int ITc_audio_meta_get_album_artist_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAlbumArtist = NULL;
int nRet = audio_meta_get_album_artist(g_hAudioMeta, &pszAlbumArtist);
//& type: auto
int ITc_audio_meta_get_artist_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszArtist = NULL;
int nRet = audio_meta_get_artist(g_hAudioMeta, &pszArtist);
//& type: auto
int ITc_audio_meta_get_bit_rate_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nBitRate = 0;
int nRet = audio_meta_get_bit_rate(g_hAudioMeta, &nBitRate);
//& type: auto
int ITc_audio_meta_get_bitpersample_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nBitpersample = 0;
int nRet = audio_meta_get_bitpersample(g_hAudioMeta, &nBitpersample);
//& type: auto
int ITc_audio_meta_get_channel_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nChannel = 0;
int nRet = audio_meta_get_channel(g_hAudioMeta, &nChannel);
//& type: auto
int ITc_audio_meta_get_composer_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszComposer = NULL;
int nRet = audio_meta_get_composer(g_hAudioMeta, &pszComposer);
//& type: auto
int ITc_audio_meta_get_copyright_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszCopyright = NULL;
int nRet = audio_meta_get_copyright(g_hAudioMeta, &pszCopyright);
//& type: auto
int ITc_audio_meta_get_duration_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nDuration = 0;
int nRet = audio_meta_get_duration(g_hAudioMeta, &nDuration);
//& type: auto
int ITc_audio_meta_get_genre_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszGenre = NULL;
int nRet = audio_meta_get_genre(g_hAudioMeta, &pszGenre);
//& type: auto
int ITc_audio_meta_get_media_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszMediaId = NULL;
int nRet = audio_meta_get_media_id(g_hAudioMeta, &pszMediaId);
//& type: auto
int ITc_audio_meta_get_recorded_date_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszRecordedDate = NULL;
int nRet = audio_meta_get_recorded_date(g_hAudioMeta, &pszRecordedDate);
//& type: auto
int ITc_audio_meta_get_sample_rate_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nSampleRate = 0;
int nRet = audio_meta_get_sample_rate(g_hAudioMeta, &nSampleRate);
//& type: auto
int ITc_audio_meta_get_track_num_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszTrackNum = NULL;
int nRet = audio_meta_get_track_num(g_hAudioMeta, &pszTrackNum);
//& type: auto
int ITc_audio_meta_get_year_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszYear = NULL;
int nRet = audio_meta_get_year(g_hAudioMeta, &pszYear);
}
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
AppendPaths(g_szImageFolder, BOOKMARKIMAGE, g_szImagePath);
nRet = media_content_scan_file(g_szImagePath);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
nRet = GetFolderPath(STORAGE_DIRECTORY_VIDEOS, g_szVideoFolder);
*/
void ITs_media_content_bookmark_cleanup(void)
{
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_bookmark_delete_from_db(g_nBookmarkId);
media_bookmark_destroy(g_hBookmark);
//& type: auto
int ITc_media_bookmark_get_bookmark_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_bookmark_get_bookmark_count_from_db(NULL, &nCount);
//& type: auto
int ITc_media_bookmark_get_bookmark_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nBookmarkId = -1;
int nRet = media_bookmark_get_bookmark_id(g_hBookmark, &nBookmarkId);
//& type: auto
int ITc_media_bookmark_get_thumbnail_path_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszBookmarkInfo = NULL;
int nRet = media_bookmark_get_thumbnail_path(g_hBookmark, &pszBookmarkInfo);
//& type: auto
int ITc_media_bookmark_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_bookmark_h hBookmark = NULL;
int nRet = media_bookmark_clone(&hBookmark, g_hBookmark);
//& type: auto
int ITc_media_bookmark_get_marked_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stTime = {0};
int nRet = media_bookmark_get_marked_time(g_hBookmark, &stTime);
//& type: auto
int ITc_media_bookmark_insert_delete_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_bookmark_delete_from_db(g_nBookmarkId);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_bookmark_delete_from_db", MediaContentGetError(nRet));
int ITc_media_bookmark_set_get_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszBookMarkGetName = NULL;
const char *pszBookMarkSetName = "test_name";
int ITc_media_bookmark_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = MEDIA_CONTENT_ERROR_NONE;
int ITc_media_bookmark_foreach_bookmark_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = -1;
filter_h hFilter = NULL;
#define TESTGENRE "COMEDY"
#define DATE "21OCT"
#define FACE_DETECTION "http://tizen.org/feature/vision.face_recognition"
+#define SCAN_FEATURE "http://tizen.org/feature/content.scanning.others"
+
#define START_TEST {\
FPRINTF("Starting test : %s\\n",__FUNCTION__);\
}\
}
+bool g_bIsScanFeatureSupported;
+bool g_bIsScanFeatureNotSupported;
+bool g_bScanFeatureMismatch;
+
+#define START_TEST_PLAYLIST {\
+ FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+ if ( !g_bMediaContentStartup )\
+ {\
+ FPRINTF("[Line : %d][%s] Precondition of Media-Content failed so leaving test\\n",__LINE__, API_NAMESPACE);\
+ return 1;\
+ }\
+ if ( g_bScanFeatureMismatch )\
+ {\
+ FPRINTF("[Line : %d][%s] Feature support as returned and error code as returned by media_content_scan_file() mismatched, Leaving test\\n", __LINE__, API_NAMESPACE);\
+ return 1;\
+ }\
+ else if ( g_bIsScanFeatureNotSupported )\
+ {\
+ FPRINTF("[Line : %d][%s] Content scanning others feature not supported, Leaving test\\n", __LINE__, API_NAMESPACE);\
+ return 0;\
+ }\
+}
+
#define CHECK_HANDLE_CLEANUP(Handle, API, FreeResource) {\
if ( Handle == NULL )\
{\
char *pszMediaId = NULL;
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
PRINT_RESULTNONE_CLEANUP(0, nRet, "GetFolderPath", "Return Value Not Correct", media_content_disconnect());
AppendPaths(g_szImageFolder, TESTIMAGE, g_szImagePath);
nRet = media_info_insert_to_db(g_szImagePath, &g_hImageInfo);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_insert_to_db", MediaContentGetError(nRet), media_content_disconnect());
nRet = media_info_get_media_id(g_hImageInfo, &pszMediaId);
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
*/
void ITs_media_content_face_cleanup(void)
{
-
if(g_hImageInfo)
{
media_face_delete_from_db(g_szImageId);
media_info_destroy(g_hImageInfo);
}
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_face_destroy(g_hFace);
media_content_disconnect();
//& type: auto
int ITc_media_face_create_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_face_destroy(g_hFace);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_face_destroy", MediaContentGetError(nRet));
//& type: auto
int ITc_media_face_clone_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_face_h hFaceHandle = NULL;
//& type: auto
int ITc_media_face_get_face_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFaceId = NULL;
//& type: auto
int ITc_media_face_get_media_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszMediaId = NULL;
//& type: auto
int ITc_media_face_set_get_face_rect_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
unsigned int rectx = 0,recty = 0,rectw = 0,recth = 0;
//& type: auto
int ITc_media_face_set_get_orientation_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_content_orientation_e SetOrient = 3;
media_content_orientation_e GetOrient = 0;
//& type: auto
int ITc_media_face_set_get_tag_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszTag = NULL;
//& type: auto
int ITc_media_face_insert_to_and_delete_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *face_id = NULL;
//& type: auto
int ITc_media_face_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_face_set_face_rect(g_hFace, 20, 22, 70, 70);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_face_set_face_rect", MediaContentGetError(nRet));
*/
int ITc_media_info_start_cancel_face_detection_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
g_CallBackHit = false;
*/
int ITc_media_face_get_face_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = -1;
int face_cnt = -1;
*/
int ITc_media_face_foreach_face_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = -1;
g_CallBackHit = false;
}
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
AppendPaths(g_szInternalStoragePath, FOLDERFILE, g_szFolderFilePath);
nRet = media_content_scan_file(g_szFolderFilePath);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
g_CallBackHit = false;
*/
void ITs_media_content_folder_cleanup(void)
{
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_folder_destroy(g_hFolder);
media_content_disconnect();
//& type: auto
int ITc_media_folder_get_folder_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_folder_get_folder_count_from_db(NULL, &nCount);
//& type: auto
int ITc_media_folder_foreach_folder_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_folder_destroy(g_hFolder);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_folder_destroy", MediaContentGetError(nRet));
//& type: auto
int ITc_media_folder_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_folder_h hFolder = NULL;
int nRet = media_folder_clone(&hFolder, g_hFolder);
//& type: auto
int ITc_media_folder_get_folder_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderId = NULL;
int nRet = media_folder_get_folder_id(g_hFolder, &pszFolderId);
//& type: auto
int ITc_media_folder_get_media_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderId = NULL;
int nRet = media_folder_get_folder_id(g_hFolder, &pszFolderId);
//& type: auto
int ITc_media_folder_foreach_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderId = NULL;
int nRet = media_folder_get_folder_id(g_hFolder, &pszFolderId);
//& type: auto
int ITc_media_folder_set_get_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderInfo = NULL;
int nRet = media_folder_set_name(g_hFolder, FOLDERNAMEIMG);
//& type: auto
int ITc_media_folder_get_path_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderInfo = NULL;
int nRet = media_folder_get_path(g_hFolder, &pszFolderInfo);
//& type: auto
int ITc_media_folder_get_folder_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderId = NULL;
int nRet = media_folder_get_folder_id(g_hFolder, &pszFolderId);
//& type: auto
int ITc_media_folder_set_get_order_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nFolderInfo = -1;
int nRet = media_folder_set_order(g_hFolder, 1);
//& type: auto
int ITc_media_folder_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_folder_update_to_db(g_hFolder);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_folder_update_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_folder_get_modified_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stTime = {0};
int nRet = media_folder_get_modified_time(g_hFolder, &stTime);
//& type: auto
int ITc_media_folder_get_storage_type_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_content_storage_e eStorageType = -1;
int nRet = media_folder_get_storage_type(g_hFolder, &eStorageType);
//& type: auto
int ITc_media_folder_get_storage_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderInfo = NULL;
int nRet = media_folder_get_storage_id(g_hFolder, &pszFolderInfo);
//& type: auto
int ITc_media_folder_get_parent_folder_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFolderInfo = NULL;
int nRet = media_folder_get_parent_folder_id(g_hFolder, &pszFolderInfo);
}
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
AppendPaths(g_szInternalStoragePath, TESTAUDIO, g_szAudioPath);
nRet = media_content_scan_file(g_szAudioPath);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
g_bMediaContentStartup = true;
*/
void ITs_media_content_group_cleanup(void)
{
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_content_disconnect();
}
//& type: auto
int ITc_media_group_get_group_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nEnumCounter = 0;
int nEnumSize = sizeof(g_eMediaGroup) / sizeof(g_eMediaGroup[0]);
//& type: auto
int ITc_media_group_foreach_group_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nEnumCounter = 0;
int nEnumSize = sizeof(g_eMediaGroup) / sizeof(g_eMediaGroup[0]);
//& type: auto
int ITc_media_group_get_media_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nEnumCounter = 0;
int nEnumSize = sizeof(g_eMediaGroup) / sizeof(g_eMediaGroup[0]);
//& type: auto
int ITc_media_group_foreach_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nEnumCounter = 0;
int nEnumSize = sizeof(g_eMediaGroup) / sizeof(g_eMediaGroup[0]);
char *pszMediaId = NULL;
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
PRINT_RESULTNONE_CLEANUP(0, nRet, "GetFolderPath", "Return Value Not Correct", media_content_disconnect());
AppendPaths(g_szImageFolder, TESTIMAGE, g_szImagePath);
nRet = media_info_insert_to_db(g_szImagePath, &g_hImageInfo);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
nRet = media_info_get_media_id(g_hImageInfo, &pszMediaId);
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
media_info_delete_from_db(g_szImageId);
media_info_destroy(g_hImageInfo);
}
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_content_disconnect();
}
//& type: auto
int ITc_image_meta_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
image_meta_h hImageMeta = NULL;
int nRet = image_meta_clone(&hImageMeta, g_hImageMeta);
//& type: auto
int ITc_image_meta_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = image_meta_update_to_db(g_hImageMeta);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "image_meta_update_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_image_meta_get_media_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszMediaId = NULL;
int nRet = image_meta_get_media_id(g_hImageMeta, &pszMediaId);
//& type: auto
int ITc_image_meta_get_height_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nHeight = 0;
int nRet = image_meta_get_height(g_hImageMeta, &nHeight);
//& type: auto
int ITc_image_meta_get_width_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nWidth = 0;
int nRet = image_meta_get_width(g_hImageMeta, &nWidth);
//& type: auto
int ITc_image_meta_get_burst_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszBurstId = NULL;
int nRet = image_meta_get_burst_id(g_hImageMeta, &pszBurstId);
//& type: auto
int ITc_image_meta_is_burst_shot_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
bool bIsBurstShot = false;
int nRet = image_meta_is_burst_shot(g_hImageMeta, &bIsBurstShot);
//& type: auto
int ITc_image_meta_get_date_taken_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszDateTaken = NULL;
int nRet = image_meta_get_date_taken(g_hImageMeta, &pszDateTaken);
//& type: auto
int ITc_image_meta_set_get_orientation_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = 0;
int nEnumCounter = 0;
//& type: auto
int ITc_image_meta_get_model_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszModel = NULL;
int nRet = image_meta_get_model(g_hImageMeta, &pszModel);
//& type: auto
int ITc_image_meta_get_exposure_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszExposureTime = NULL;
int nRet = image_meta_get_exposure_time(g_hImageMeta, &pszExposureTime);
//& type: auto
int ITc_image_meta_get_iso_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nIso = 0;
int nRet = image_meta_get_iso(g_hImageMeta, &nIso);
//& type: auto
int ITc_image_meta_get_fnumber_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
double dFnumber = 0;
int nRet = image_meta_get_fnumber(g_hImageMeta, &dFnumber);
g_hAudioInfo = NULL;
g_hImageInfo = NULL;
g_hVideoInfo = NULL;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
PRINT_RESULTNONE_CLEANUP(0, nRet, "GetFolderPath", "Return Value Not Correct", media_content_disconnect());
AppendPaths(g_szAudioFolder, TESTAUDIO, g_szAudioPath);
nRet = media_info_insert_to_db(g_szAudioPath, &g_hAudioInfo);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_insert_to_db", MediaContentGetError(nRet), media_content_disconnect());
nRet = media_info_get_media_id(g_hAudioInfo, &pszMediaId);
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
media_info_destroy(g_hVideoInfo);
g_hVideoInfo = NULL;
}
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_content_disconnect();
}
//& type: auto
int ITc_media_info_get_media_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_info_get_media_count_from_db(NULL, &nCount);
//& type: auto
int ITc_media_info_foreach_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
g_CallBackHit = false;
int nRet = media_info_foreach_media_from_db(NULL, ForeachMediaCb, TESTSTRING);
//& type: auto
int ITc_media_info_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_info_h hInfo = NULL;
int nRet = media_info_clone(&hInfo, g_hAudioInfo);
//& type: auto
int ITc_media_info_insert_delete_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszMediaId = NULL;
int nRet = media_info_delete_from_db(g_szAudioId);
//& type: auto
int ITc_media_info_create_get_thumbnail_path_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszThumbNailPath = NULL;
g_CallBackHit = false;
//& type: auto
int ITc_media_info_create_cancel_thumbnail_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_create_thumbnail(g_hAudioInfo, ThumbnailCompletedCb, TESTSTRING);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_create_thumbnail", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_insert_delete_batch_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_delete_from_db(g_szImageId);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_delete_from_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_foreach_bookmark_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stTime = {0};
time(&stTime);
//& type: auto
int ITc_media_info_foreach_tag_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nTagId = -1;
media_tag_h hMediaTag = NULL;
//& type: auto
int ITc_media_info_get_bookmark_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_info_get_bookmark_count_from_db(g_szVideoId, NULL, &nCount);
//& type: auto
int ITc_media_info_get_tag_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_info_get_tag_count_from_db(g_szVideoId, NULL, &nCount);
//& type: auto
int ITc_media_info_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_update_to_db(g_hAudioInfo);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_update_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_get_media_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAudioId = NULL;
int nRet = media_info_get_media_id(g_hAudioInfo, &pszAudioId);
//& type: auto
int ITc_media_info_get_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_info_h hInfo = NULL;
int nRet = media_info_get_media_from_db(g_szAudioId, &hInfo);
//& type: auto
int ITc_media_info_set_get_added_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stGetTime = {0};
time_t stSetTime = {0};
//& type: auto
int ITc_media_info_set_get_age_rating_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszRating = NULL;
//& type: auto
int ITc_media_info_set_get_altitude_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
double dSetAltitude = 200;
double dGetAltitude = 0;
//& type: auto
int ITc_media_info_set_get_author_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAuthor = NULL;
//& type: auto
int ITc_media_info_set_get_category_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszCategory = NULL;
//& type: auto
int ITc_media_info_set_get_content_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszContent = NULL;
//& type: auto
int ITc_media_info_set_get_description_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszDescription = NULL;
//& type: auto
int ITc_media_info_set_get_display_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszDisplayName = NULL;
//& type: auto
int ITc_media_info_set_get_favorite_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
bool bSetFavorite = true;
bool bGetFavorite = false;
//& type: auto
int ITc_media_info_get_file_path_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszFilePath = NULL;
int nRet = media_info_get_file_path(g_hVideoInfo, &pszFilePath);
//& type: auto
int ITc_media_info_get_image_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
image_meta_h hImage = NULL;
int nRet = media_info_get_image(g_hImageInfo, &hImage);
//& type: auto
int ITc_media_info_get_audio_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
audio_meta_h hAudio = NULL;
int nRet = media_info_get_audio(g_hAudioInfo, &hAudio);
//& type: auto
int ITc_media_info_get_video_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
video_meta_h hVideo = NULL;
int nRet = media_info_get_video(g_hVideoInfo, &hVideo);
//& type: auto
int ITc_media_info_get_modified_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stModifiedTime = {0};
int nRet = media_info_get_modified_time(g_hVideoInfo, &stModifiedTime);
//& type: auto
int ITc_media_info_set_get_keyword_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszKeyword = NULL;
//& type: auto
int ITc_media_info_set_get_latitude_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
double dSetLatitude = 200;
double dGetLatitude = 0;
//& type: auto
int ITc_media_info_set_get_longitude_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
double dSetLongitude = 200;
double dGetLongitude = 0;
//& type: auto
int ITc_media_info_set_get_location_tag_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszLocationTag = NULL;
//& type: auto
int ITc_media_info_set_get_provider_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszProvider = NULL;
//& type: auto
int ITc_media_info_set_get_rating_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nSetRating = 4;
int nGetRating = 1;
//& type: auto
int ITc_media_info_set_get_weather_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszWeather = NULL;
//& type: auto
int ITc_media_info_is_drm_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
bool bIsDrm = false;
int nRet = media_info_is_drm(g_hVideoInfo, &bIsDrm);
//& type: auto
int ITc_media_info_refresh_metadata_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_refresh_metadata_to_db(g_szAudioId);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_refresh_metadata_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_increase_played_count_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_increase_played_count(g_hVideoInfo);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_increase_played_count", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_set_get_played_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stGetTime = {0};
int nRet = media_info_set_played_time(g_hVideoInfo);
//& type: auto
int ITc_media_info_get_media_type_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_content_type_e eMediaType = MEDIA_CONTENT_TYPE_OTHERS;
int nRet = media_info_get_media_type(g_hVideoInfo, &eMediaType);
//& type: auto
int ITc_media_info_get_mime_type_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszMimeType = NULL;
int nRet = media_info_get_mime_type(g_hVideoInfo, &pszMimeType);
//& type: auto
int ITc_media_info_get_size_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
unsigned long long ullSize = 0;
int nRet = media_info_get_size(g_hVideoInfo, &ullSize);
//& type: auto
int ITc_media_info_get_timeline_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stTimeline = 0;
int nRet = media_info_get_timeline(g_hVideoInfo, &stTimeline);
//& type: auto
int ITc_media_info_get_title_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszTitle = NULL;
int nRet = media_info_get_title(g_hVideoInfo, &pszTitle);
//& type: auto
int ITc_media_info_get_played_count_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlayedCount = 0;
int nRet = media_info_get_played_count(g_hVideoInfo, &nPlayedCount);
//& type: auto
int ITc_media_info_get_storage_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszStorageId = NULL;
int nRet = media_info_get_storage_id(g_hVideoInfo, &pszStorageId);
//& type: auto
int ITc_media_info_get_storage_type_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_content_storage_e eStorageType = -1;
int nRet = media_info_get_storage_type(g_hVideoInfo, &eStorageType);
//& type: auto
int ITc_media_info_move_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
AppendSlash(g_szInternalStoragePath, g_szFinalPath);
int nRet = media_info_move_to_db(g_hAudioInfo, g_szFinalPath);
//& type: auto
int ITc_media_info_insert_burst_shot_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_delete_from_db(g_szImageId);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_delete_from_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_get_face_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_info_get_face_count_from_db(g_szVideoId, NULL, &nCount);
//& type: auto
int ITc_media_info_foreach_face_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_face_create(g_szImageId,&g_hFace);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_face_create", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_create_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_create(g_szAudioPath, &g_hInfo);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_create", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_insert_to_db_with_data_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_delete_from_db(g_szAudioId);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_delete_from_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_set_title_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_set_title(g_hVideoInfo, TESTTITLE);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_set_title", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_set_album_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_set_album(g_hAudioInfo, TESTAUDIO);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_set_album", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_set_artist_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_set_artist(g_hAudioInfo, TESTARTIST);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_set_artist", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_set_genre_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_set_genre(g_hAudioInfo, TESTDESCRIPTION);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_set_genre", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_set_recorded_date_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_info_set_recorded_date(g_hAudioInfo,TESTKEYWORD);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_set_recorded_date", MediaContentGetError(nRet));
//& type: auto
int ITc_media_info_is_360_content_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
bool bIs360 = false;
int nRet = media_info_is_360_content(g_hVideoInfo, &bIs360);
}
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
AppendPaths(g_szAudioFolder, TESTAUDIO, g_szAudioPath);
nRet = media_content_scan_file(g_szAudioPath);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
nRet = media_playlist_insert_to_db(PLAYLISTNAME, &g_hPlaylist);
*/
void ITs_media_content_playlist_cleanup(void)
{
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_playlist_delete_from_db(g_nPlaylistId);
media_playlist_destroy(g_hPlaylist);
//& type: auto
int ITc_media_playlist_get_playlist_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_playlist_get_playlist_count_from_db(NULL, &nCount);
//& type: auto
int ITc_media_playlist_foreach_playlist_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_playlist_destroy(g_hPlaylist);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_playlist_destroy", MediaContentGetError(nRet));
//& type: auto
int ITc_media_playlist_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_playlist_h hPlaylist = NULL;
int nRet = media_playlist_clone(&hPlaylist, g_hPlaylist);
//& type: auto
int ITc_media_playlist_get_playlist_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlaylistId = -1;
int nRet = media_playlist_get_playlist_id(g_hPlaylist, &nPlaylistId);
//& type: auto
int ITc_media_playlist_get_media_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlaylistId = -1;
int nRet = media_playlist_get_playlist_id(g_hPlaylist, &nPlaylistId);
//& type: auto
int ITc_media_playlist_foreach_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlaylistId = -1;
int nRet = media_playlist_get_playlist_id(g_hPlaylist, &nPlaylistId);
//& type: auto
int ITc_media_playlist_set_get_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszPlaylistInfo = NULL;
int nRet = media_playlist_set_name(g_hPlaylist, PLAYLISTNAME);
//& type: auto
int ITc_media_playlist_get_playlist_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlaylistId = -1;
int nRet = media_playlist_get_playlist_id(g_hPlaylist, &nPlaylistId);
//& type: auto
int ITc_media_playlist_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_playlist_update_to_db(g_hPlaylist);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_playlist_update_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_playlist_insert_delete_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_playlist_h hMediaPlaylist = NULL;
int nPlaylistId = -1;
//& type: auto
int ITc_media_playlist_set_get_thumbnail_path_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszPlaylistInfo = NULL;
int nRet = GetFolderPath(STORAGE_DIRECTORY_IMAGES, g_szImageFolder);
//& type: auto
int ITc_media_playlist_add_remove_media_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlaylistId = -1;
int nRet = media_playlist_get_playlist_id(g_hPlaylist, &nPlaylistId);
//& type: auto
int ITc_media_playlist_set_get_play_order_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlayOrder = -1;
int nPlaylistId = -1;
//& type: auto
int ITc_media_playlist_import_export_to_file_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nPlaylistId = -1;
media_playlist_h hMediaPlaylist = NULL;
}
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
AppendPaths(g_szInternalStoragePath, TESTAUDIO, g_szAudioPath);
nRet = media_content_scan_file(g_szAudioPath);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
g_CallBackHit = false;
*/
void ITs_media_content_storage_cleanup(void)
{
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_storage_destroy(g_hStorage);
media_content_disconnect();
//& type: auto
int ITc_media_storage_get_storage_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_storage_get_storage_count_from_db(NULL, &nCount);
//& type: auto
int ITc_media_storage_foreach_storage_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_storage_destroy(g_hStorage);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_storage_destroy", MediaContentGetError(nRet));
//& type: auto
int ITc_media_storage_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_storage_h hStorage = NULL;
int nRet = media_storage_clone(&hStorage, g_hStorage);
//& type: auto
int ITc_media_storage_get_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszStorageId = NULL;
int nRet = media_storage_get_id(g_hStorage, &pszStorageId);
//& type: auto
int ITc_media_storage_get_media_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszStorageId = NULL;
int nRet = media_storage_get_id(g_hStorage, &pszStorageId);
//& type: auto
int ITc_media_storage_foreach_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszStorageId = NULL;
int nRet = media_storage_get_id(g_hStorage, &pszStorageId);
//& type: auto
int ITc_media_storage_get_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszStorageInfo = NULL;
media_content_storage_e eStorageInfo = -1;
//& type: auto
int ITc_media_storage_get_path_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszStorageInfo = NULL;
int nRet = media_storage_get_path(g_hStorage, &pszStorageInfo);
//& type: auto
int ITc_media_storage_get_type_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_content_storage_e eStorageInfo = -1;
int nRet = media_storage_get_type(g_hStorage, &eStorageInfo);
//& type: auto
int ITc_media_storage_get_storage_info_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszStorageId = NULL;
int nRet = media_storage_get_id(g_hStorage, &pszStorageId);
}
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
AppendPaths(g_szImageFolder, TESTIMAGE, g_szImagePath);
nRet = media_content_scan_file(g_szImagePath);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
nRet = media_tag_insert_to_db(TAGNAME, &g_hTag);
*/
void ITs_media_content_tag_cleanup(void)
{
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_tag_remove_media(g_hTag, g_szMediaId);
media_tag_update_to_db(g_hTag);
//& type: auto
int ITc_media_tag_get_tag_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nCount = -1;
int nRet = media_tag_get_tag_count_from_db(NULL, &nCount);
//& type: auto
int ITc_media_tag_foreach_tag_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
g_CallBackHit = false;
int nRet = media_tag_foreach_tag_from_db(NULL, ForeachTagCb, TESTSTRING);
//& type: auto
int ITc_media_tag_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_tag_h hTag = NULL;
int nRet = media_tag_clone(&hTag, g_hTag);
//& type: auto
int ITc_media_tag_get_tag_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nTagId = -1;
int nRet = media_tag_get_tag_id(g_hTag, &nTagId);
//& type: auto
int ITc_media_tag_get_media_count_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nTagId = -1;
int nRet = media_tag_get_tag_id(g_hTag, &nTagId);
//& type: auto
int ITc_media_tag_foreach_media_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nTagId = -1;
int nRet = media_tag_get_tag_id(g_hTag, &nTagId);
//& type: auto
int ITc_media_tag_get_tag_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nTagId = -1;
int nRet = media_tag_get_tag_id(g_hTag, &nTagId);
//& type: auto
int ITc_media_tag_set_get_name_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszTagInfo = NULL;
int nRet = media_tag_set_name(g_hTag, TAGNAME);
//& type: auto
int ITc_media_tag_add_remove_media_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_tag_remove_media(g_hTag, g_szMediaId);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_tag_remove_media", MediaContentGetError(nRet));
//& type: auto
int ITc_media_tag_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = media_tag_update_to_db(g_hTag);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_tag_update_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_media_tag_insert_delete_from_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
media_tag_h hMediaTag = NULL;
int nTagId = -1;
char *pszMediaId = NULL;
g_bMediaContentStartup = false;
+ g_bIsScanFeatureSupported = false;
+ g_bIsScanFeatureNotSupported = false;
+ g_bScanFeatureMismatch= false;
+
+ g_bIsScanFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
int nRet = media_content_connect();
PRINT_RESULTNONE(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_connect", MediaContentGetError(nRet));
PRINT_RESULTNONE_CLEANUP(0, nRet, "GetFolderPath", "Return Value Not Correct", media_content_disconnect());
AppendPaths(g_szVideoFolder, TESTVIDEO, g_szVideoPath);
nRet = media_info_insert_to_db(g_szVideoPath, &g_hVideoInfo);
+ if ( !g_bIsScanFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ g_bScanFeatureMismatch = true;
+ }
+ else
+ {
+ g_bIsScanFeatureNotSupported = true;
+ }
+ media_content_disconnect();
+ return;
+ }
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet), media_content_disconnect());
nRet = media_info_get_media_id(g_hVideoInfo, &pszMediaId);
PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
media_info_delete_from_db(g_szVideoId);
media_info_destroy(g_hVideoInfo);
}
- if(g_bMediaContentStartup)
+ if(g_bMediaContentStartup && g_bIsScanFeatureSupported)
{
media_content_disconnect();
}
//& type: auto
int ITc_video_meta_clone_destroy_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
video_meta_h hVideoMeta = NULL;
int nRet = video_meta_clone(&hVideoMeta, g_hVideoMeta);
//& type: auto
int ITc_video_meta_set_get_played_count_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nSetPlayedCount = 4;
int nGetPlayedCount = 1;
//& type: auto
int ITc_video_meta_set_get_played_position_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nSetPlayedPosition = 4;
int nGetPlayedPosition = 1;
//& type: auto
int ITc_video_meta_set_get_played_time_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
time_t stGetTime = {0};
time_t stSetTime = {0};
//& type: auto
int ITc_video_meta_update_to_db_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRet = video_meta_update_to_db(g_hVideoMeta);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "video_meta_update_to_db", MediaContentGetError(nRet));
//& type: auto
int ITc_video_meta_get_album_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAlbum = NULL;
int nRet = video_meta_get_album(g_hVideoMeta, &pszAlbum);
//& type: auto
int ITc_video_meta_get_album_artist_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszAlbumArtist = NULL;
int nRet = video_meta_get_album_artist(g_hVideoMeta, &pszAlbumArtist);
//& type: auto
int ITc_video_meta_get_artist_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszArtist = NULL;
int nRet = video_meta_get_artist(g_hVideoMeta, &pszArtist);
//& type: auto
int ITc_video_meta_get_bit_rate_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nBitRate = 0;
int nRet = video_meta_get_bit_rate(g_hVideoMeta, &nBitRate);
//& type: auto
int ITc_video_meta_get_composer_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszComposer = NULL;
int nRet = video_meta_get_composer(g_hVideoMeta, &pszComposer);
//& type: auto
int ITc_video_meta_get_copyright_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszCopyright = NULL;
int nRet = video_meta_get_copyright(g_hVideoMeta, &pszCopyright);
//& type: auto
int ITc_video_meta_get_duration_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nDuration = 0;
int nRet = video_meta_get_duration(g_hVideoMeta, &nDuration);
//& type: auto
int ITc_video_meta_get_genre_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszGenre = NULL;
int nRet = video_meta_get_genre(g_hVideoMeta, &pszGenre);
//& type: auto
int ITc_video_meta_get_media_id_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszMediaId = NULL;
int nRet = video_meta_get_media_id(g_hVideoMeta, &pszMediaId);
//& type: auto
int ITc_video_meta_get_recorded_date_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszRecordedDate = NULL;
int nRet = video_meta_get_recorded_date(g_hVideoMeta, &pszRecordedDate);
//& type: auto
int ITc_video_meta_get_track_num_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszTrackNum = NULL;
int nRet = video_meta_get_track_num(g_hVideoMeta, &pszTrackNum);
//& type: auto
int ITc_video_meta_get_year_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
char *pszYear = NULL;
int nRet = video_meta_get_year(g_hVideoMeta, &pszYear);
//& type: auto
int ITc_video_meta_get_height_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nHeight = 0;
int nRet = video_meta_get_height(g_hVideoMeta, &nHeight);
//& type: auto
int ITc_video_meta_get_width_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nWidth = 0;
int nRet = video_meta_get_width(g_hVideoMeta, &nWidth);
*/
int ITc_video_meta_get_rotation_p(void)
{
- START_TEST;
+ START_TEST_PLAYLIST;
int nRotation = 0;
int nRet = video_meta_get_rotation(g_hVideoMeta, &nRotation);
int ITc_media_content_scan_file_p(void)
{
START_TEST;
+ bool bIsFeatureSupported = true;
int nRet = GetInternalStorageIdandPath();
PRINT_RESULT(0, nRet, "GetInternalStorageId", "Return Value Not Correct");
AppendPaths(g_szInternalStoragePath, TESTIMAGE, g_szImagePath);
+ bIsFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
nRet = media_content_scan_file(g_szImagePath);
+ if ( !bIsFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ FPRINTF("[Line : %d][%s] media_content_scan_file returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, MediaContentGetError(nRet));
+ return 1;
+ }
+ else
+ {
+ FPRINTF("[Line : %d][%s] media_content_scan_file correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, MediaContentGetError(nRet));
+ return 0;
+ }
+ }
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet));
return 0;
int ITc_media_content_set_unset_db_updated_cb_p(void)
{
START_TEST;
+ bool bIsFeatureSupported = true;
int nRet = GetInternalStorageIdandPath();
PRINT_RESULT(0, nRet, "GetInternalStorageId", "Return Value Not Correct");
nRet = media_content_set_db_updated_cb(DataBaseUpdatedCb, TESTSTRING);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_set_db_updated_cb", MediaContentGetError(nRet));
+ bIsFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
nRet = media_content_scan_file(g_szImagePath);
+ if ( !bIsFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ FPRINTF("[Line : %d][%s] media_content_scan_file returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, MediaContentGetError(nRet));
+ media_content_unset_db_updated_cb();
+ return 1;
+ }
+ else
+ {
+ FPRINTF("[Line : %d][%s] media_content_scan_file correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, MediaContentGetError(nRet));
+ media_content_unset_db_updated_cb();
+ return 0;
+ }
+ }
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet));
IterateGmainLoop();
int ITc_media_content_add_remove_db_updated_cb_p(void)
{
START_TEST;
-
+
media_content_noti_h hNotiHandle;
+ bool bIsFeatureSupported = true;
int nRet = GetInternalStorageIdandPath();
PRINT_RESULT(0, nRet, "GetInternalStorageId", "Return Value Not Correct");
g_CallBackHit = false;
nRet = media_content_add_db_updated_cb(DataBaseUpdatedCb, NULL,&hNotiHandle);
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_add_db_updated_cb", MediaContentGetError(nRet));
-
+
+ bIsFeatureSupported = TCTCheckSystemInfoFeatureSupported(SCAN_FEATURE, API_NAMESPACE);
+
nRet = media_content_scan_file(g_szImagePath);
+ if ( !bIsFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ FPRINTF("[Line : %d][%s] media_content_scan_file returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, MediaContentGetError(nRet));
+ media_content_remove_db_updated_cb(hNotiHandle);
+ return 1;
+ }
+ else
+ {
+ FPRINTF("[Line : %d][%s] media_content_scan_file correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, MediaContentGetError(nRet));
+ media_content_remove_db_updated_cb(hNotiHandle);
+ return 0;
+ }
+ }
PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_content_scan_file", MediaContentGetError(nRet));
IterateGmainLoop();