[TCT][packaging/src/scripts/templates][NonACR][DPTTIZEN-1896(Directory Path): Removed...
authorSatyajit Anand <satyajit.a@samsung.com>
Wed, 8 Jun 2016 05:30:57 +0000 (14:30 +0900)
committerSatyajit Anand <satyajit.a@samsung.com>
Wed, 8 Jun 2016 05:30:57 +0000 (14:30 +0900)
Change-Id: I5087400d03edc3e0c932e4614f1ce87d3cb40959
Signed-off-by: Satyajit Anand <satyajit.a@samsung.com>
75 files changed:
packaging/ctc/native-platform-permission-ctc.spec
packaging/itc/native-media-content-itc.spec [changed mode: 0755->0644]
packaging/itc/native-media-vision-itc.spec [changed mode: 0755->0644]
packaging/itc/native-service-adaptor-itc.spec [changed mode: 0755->0644]
packaging/itc/native-shortcut-itc.spec [changed mode: 0755->0644]
packaging/utc/core-capi-media-vision-tests.spec [changed mode: 0755->0644]
packaging/utc/core-email-tests.spec [changed mode: 0755->0644]
packaging/utc/core-media-content-tests.spec [changed mode: 0755->0644]
packaging/utc/core-metadata-editor-tests.spec [changed mode: 0755->0644]
packaging/utc/core-service-adaptor-tests.spec [changed mode: 0755->0644]
packaging/utc/core-streamrecorder-tests.spec [changed mode: 0755->0644]
packaging/utc/core-wav-player-tests.spec [changed mode: 0755->0644]
scripts/tcbuild.sh [changed mode: 0755->0644]
scripts/tcbuildsdk.sh [changed mode: 0755->0644]
scripts/tctestsgen.sh [changed mode: 0755->0644]
src/CMakeLists.txt [changed mode: 0755->0644]
src/common/tct_common.c [changed mode: 0755->0644]
src/common/tct_common.h [changed mode: 0755->0644]
src/ctc/platform-permission/CTs-platform-permission-media-streamer.c [changed mode: 0755->0644]
src/ctc/platform-permission/CTs-platform-permission-service-adaptor-client.c [changed mode: 0755->0644]
src/itc/capi-media-streamer/ITs-capi-media-streamer.c [changed mode: 0755->0644]
src/itc/capi-mediademuxer/ITs-capi-mediademuxer.c [changed mode: 0755->0644]
src/itc/capi-mediamuxer/ITs-capi-mediamuxer.c [changed mode: 0755->0644]
src/itc/media-vision/ITs-media-vision-common.h [changed mode: 0755->0644]
src/itc/media-vision/ITs-media-vision-face.c [changed mode: 0755->0644]
src/itc/service-adaptor/ITs-service-adaptor-common.c [changed mode: 0755->0644]
src/itc/service-adaptor/ITs-service-adaptor-common.h [changed mode: 0755->0644]
src/itc/service-adaptor/ITs-service-adaptor-storage.c [changed mode: 0755->0644]
src/itc/service-adaptor/ITs-service-adaptor.c [changed mode: 0755->0644]
src/itc/shortcut/ITs-shortcut-common.h [changed mode: 0755->0644]
src/itc/shortcut/ITs-shortcut.c [changed mode: 0755->0644]
src/itc/shortcut/res/mobile/icon.png [moved from src/itc/shortcut/icon.png with 100% similarity, mode: 0644]
src/itc/shortcut/res/wearable/icon.png [new file with mode: 0644]
src/utc/calendar-service2/CMakeLists.txt [changed mode: 0755->0644]
src/utc/calendar-service2/utc-calendar-vcalendar.c [changed mode: 0755->0644]
src/utc/capi-media-vision/CMakeLists.txt [changed mode: 0755->0644]
src/utc/capi-media-vision/utc-mv_barcode.c [changed mode: 0755->0644]
src/utc/capi-media-vision/utc-mv_face.c [changed mode: 0755->0644]
src/utc/capi-media-vision/utc-mv_image.c [changed mode: 0755->0644]
src/utc/capi-media-vision/utc-mv_surveillance.c [changed mode: 0755->0644]
src/utc/contacts-service2/CMakeLists.txt [changed mode: 0755->0644]
src/utc/contacts-service2/utc-contacts-service-tc-utils.c [changed mode: 0755->0644]
src/utc/image-util/CMakeLists.txt [changed mode: 0755->0644]
src/utc/image-util/utc-image-util-decode-encode.c [changed mode: 0755->0644]
src/utc/image-util/utc-image-util-jpeg.c
src/utc/image-util/utc-media-image-util-basic.c [changed mode: 0755->0644]
src/utc/iotcon/CMakeLists.txt [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-security.c [changed mode: 0755->0644]
src/utc/mediacodec/CMakeLists.txt [changed mode: 0755->0644]
src/utc/mediacodec/utc-media-mediacodec.c [changed mode: 0755->0644]
src/utc/mediademuxer/CMakeLists.txt [changed mode: 0755->0644]
src/utc/mediademuxer/utc-mediademuxer.c [changed mode: 0755->0644]
src/utc/mediamuxer/CMakeLists.txt [changed mode: 0755->0644]
src/utc/mediamuxer/utc-mediamuxer.c [changed mode: 0755->0644]
src/utc/messages/CMakeLists.txt [changed mode: 0755->0644]
src/utc/messages/utc-messaging-messages.c [changed mode: 0755->0644]
src/utc/metadata-editor/CMakeLists.txt [changed mode: 0755->0644]
src/utc/metadata-editor/utc-metadata-editor.c [changed mode: 0755->0644]
src/utc/metadata-extractor/CMakeLists.txt [changed mode: 0755->0644]
src/utc/metadata-extractor/utc-metadata-extractor.c [changed mode: 0755->0644]
src/utc/player/CMakeLists.txt [changed mode: 0755->0644]
src/utc/player/utc-media-player-callback.c
src/utc/player/utc-media-player-display.c
src/utc/player/utc-media-player-es.c
src/utc/player/utc-media-player-lifecycle.c
src/utc/player/utc-media-player-streaming.c
src/utc/player/utc-media-player.c
src/utc/service-adaptor/CMakeLists.txt [changed mode: 0755->0644]
src/utc/service-adaptor/common.c [changed mode: 0755->0644]
src/utc/service-adaptor/utc-service-adaptor-client-storage.c [changed mode: 0755->0644]
src/utc/thumbnail-util/CMakeLists.txt [changed mode: 0755->0644]
src/utc/thumbnail-util/utc-thumbnail-util.c [changed mode: 0755->0644]
src/utc/video-util/CMakeLists.txt [changed mode: 0755->0644]
src/utc/video-util/utc-video-util.c [changed mode: 0755->0644]
templates/tct-package/inst.sh [changed mode: 0755->0644]

index 16ab95f..2ee5f2f 100755 (executable)
@@ -148,35 +148,35 @@ cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/usr/share/packages/
 mkdir -p %{buildroot}%{APP_PATH}/%{name}/bin
 #cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
 
-mkdir -p %{buildroot}/home/owner/content/Images
-cp src/ctc/%{MODULE_NAME}/PlatformPermission_test.jpg %{buildroot}/home/owner/content/Images/PlatformPermission_test.jpg
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}/Images
+cp src/ctc/%{MODULE_NAME}/PlatformPermission_test.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/PlatformPermission_test.jpg
 
-mkdir -p %{buildroot}/home/owner/content/Videos
-mkdir -p %{buildroot}/home/owner/content/Music
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}/Videos
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}/Music
 
 mkdir -p %{buildroot}%{APP_PATH}%{name}/res
 cp -r src/ctc/platform-permission/res/* %{buildroot}%{APP_PATH}%{name}/res
 
 %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
-cp src/ctc/%{MODULE_NAME}/res/mobile/TestImage.jpg %{buildroot}/home/owner/content/Images/TestImage.jpg
-cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage1.jpg %{buildroot}/home/owner/content/Images/BurstImage1.jpg
-cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage2.jpg %{buildroot}/home/owner/content/Images/BurstImage2.jpg
-cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage3.jpg %{buildroot}/home/owner/content/Images/BurstImage3.jpg
-cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage4.jpg %{buildroot}/home/owner/content/Images/BurstImage4.jpg
-cp src/ctc/%{MODULE_NAME}/res/mobile/BookMarkImage.jpg %{buildroot}/home/owner/content/Images/BookMarkImage.jpg
-cp src/ctc/%{MODULE_NAME}/res/mobile/TestVideo.mp4 %{buildroot}/home/owner/content/Videos/TestVideo.mp4
-cp src/ctc/%{MODULE_NAME}/res/mobile/TestAudio.mp3 %{buildroot}/home/owner/content/Music/TestAudio.mp3
+cp src/ctc/%{MODULE_NAME}/res/mobile/TestImage.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/TestImage.jpg
+cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage1.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage1.jpg
+cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage2.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage2.jpg
+cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage3.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage3.jpg
+cp src/ctc/%{MODULE_NAME}/res/mobile/BurstImage4.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage4.jpg
+cp src/ctc/%{MODULE_NAME}/res/mobile/BookMarkImage.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BookMarkImage.jpg
+cp src/ctc/%{MODULE_NAME}/res/mobile/TestVideo.mp4 %{buildroot}%{INTERNAL_STORAGE_PATH}/Videos/TestVideo.mp4
+cp src/ctc/%{MODULE_NAME}/res/mobile/TestAudio.mp3 %{buildroot}%{INTERNAL_STORAGE_PATH}/Music/TestAudio.mp3
 %endif
 
 %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
-cp src/ctc/%{MODULE_NAME}/res/wearable/TestImage.jpg %{buildroot}/home/owner/content/Images/TestImage.jpg
-cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage1.jpg %{buildroot}/home/owner/content/Images/BurstImage1.jpg
-cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage2.jpg %{buildroot}/home/owner/content/Images/BurstImage2.jpg
-cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage3.jpg %{buildroot}/home/owner/content/Images/BurstImage3.jpg
-cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage4.jpg %{buildroot}/home/owner/content/Images/BurstImage4.jpg
-cp src/ctc/%{MODULE_NAME}/res/wearable/BookMarkImage.jpg %{buildroot}/home/owner/content/Images/BookMarkImage.jpg
-cp src/ctc/%{MODULE_NAME}/res/wearable/TestVideo.mp4 %{buildroot}/home/owner/content/Videos/TestVideo.mp4
-cp src/ctc/%{MODULE_NAME}/res/wearable/TestAudio.mp3 %{buildroot}/home/owner/content/Music/TestAudio.mp3
+cp src/ctc/%{MODULE_NAME}/res/wearable/TestImage.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/TestImage.jpg
+cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage1.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage1.jpg
+cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage2.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage2.jpg
+cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage3.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage3.jpg
+cp src/ctc/%{MODULE_NAME}/res/wearable/BurstImage4.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BurstImage4.jpg
+cp src/ctc/%{MODULE_NAME}/res/wearable/BookMarkImage.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}/Images/BookMarkImage.jpg
+cp src/ctc/%{MODULE_NAME}/res/wearable/TestVideo.mp4 %{buildroot}%{INTERNAL_STORAGE_PATH}/Videos/TestVideo.mp4
+cp src/ctc/%{MODULE_NAME}/res/wearable/TestAudio.mp3 %{buildroot}%{INTERNAL_STORAGE_PATH}/Music/TestAudio.mp3
 %endif
 
 %pre
@@ -191,4 +191,4 @@ chsmack -a %{name} %{APP_PATH}%{name}/data
 %{APP_PATH}%{name}/*
 /usr/share/packages/native-%{MODULE_NAME}-ctc.xml
 /usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}/*
old mode 100755 (executable)
new mode 100644 (file)
index 59d8487..4bfe9f1
@@ -88,31 +88,35 @@ mkdir -p %{buildroot}%{APP_PATH}%{name}/data/Music
 cp src/itc/media-content/TestAudio.mp3 %{buildroot}%{APP_PATH}%{name}/data/Music/TestAudio.mp3
 
 %post
-mkdir -p /home/owner/content/TestFolder
-cp %{APP_PATH}%{name}/data/TestImage.jpg /home/owner/content/TestFolder/TestImage.jpg
-cp %{APP_PATH}%{name}/data/TestImage.jpg /home/owner/content/TestImage.jpg
-cp %{APP_PATH}%{name}/data/TestImage.jpg /home/owner/content/Remove.jpg
-cp %{APP_PATH}%{name}/data/TestAudio.mp3 /home/owner/content/TestAudio.mp3
-cp -R %{APP_PATH}%{name}/data/Images/* /home/owner/content/Images/
-cp -R %{APP_PATH}%{name}/data/Videos/* /home/owner/content/Videos/
-cp -R %{APP_PATH}%{name}/data/Music/* /home/owner/content/Music/
-chmod -R 777 /home/owner/content/Music
+mkdir -p %{INTERNAL_STORAGE_PATH}
+mkdir -p %{INTERNAL_STORAGE_PATH}/TestFolder
+mkdir -p %{INTERNAL_STORAGE_PATH}/Images
+mkdir -p %{INTERNAL_STORAGE_PATH}/Videos
+mkdir -p %{INTERNAL_STORAGE_PATH}/Music
+cp %{APP_PATH}%{name}/data/TestImage.jpg %{INTERNAL_STORAGE_PATH}/TestFolder/TestImage.jpg
+cp %{APP_PATH}%{name}/data/TestImage.jpg %{INTERNAL_STORAGE_PATH}/TestImage.jpg
+cp %{APP_PATH}%{name}/data/TestImage.jpg %{INTERNAL_STORAGE_PATH}/Remove.jpg
+cp %{APP_PATH}%{name}/data/TestAudio.mp3 %{INTERNAL_STORAGE_PATH}/TestAudio.mp3
+cp -R %{APP_PATH}%{name}/data/Images/* %{INTERNAL_STORAGE_PATH}/Images/
+cp -R %{APP_PATH}%{name}/data/Videos/* %{INTERNAL_STORAGE_PATH}/Videos/
+cp -R %{APP_PATH}%{name}/data/Music/* %{INTERNAL_STORAGE_PATH}/Music/
+chmod -R 777 %{INTERNAL_STORAGE_PATH}/Music
 
 %postun
-rm -rf /home/owner/content/TestFolder
-rm /home/owner/content/TestImage.jpg
-rm /home/owner/content/Remove.jpg
-rm /home/owner/content/TestAudio.mp3
-rm /home/owner/content/Images/TestImage.jpg
-rm /home/owner/content/Images/BookMarkImage.jpg
-rm /home/owner/content/Images/ThumbNailImage.jpg
-rm /home/owner/content/Images/BurstImage1.jpg
-rm /home/owner/content/Images/BurstImage2.jpg
-rm /home/owner/content/Images/BurstImage3.jpg
-rm /home/owner/content/Images/BurstImage4.jpg
-rm /home/owner/content/Videos/TestVideo.mp4
-rm /home/owner/content/Music/TestAudio.mp3
-chmod -R 700 /home/owner/content/Music
+rm -rf %{INTERNAL_STORAGE_PATH}/TestFolder
+rm %{INTERNAL_STORAGE_PATH}/TestImage.jpg
+rm %{INTERNAL_STORAGE_PATH}/Remove.jpg
+rm %{INTERNAL_STORAGE_PATH}/TestAudio.mp3
+rm %{INTERNAL_STORAGE_PATH}/Images/TestImage.jpg
+rm %{INTERNAL_STORAGE_PATH}/Images/BookMarkImage.jpg
+rm %{INTERNAL_STORAGE_PATH}/Images/ThumbNailImage.jpg
+rm %{INTERNAL_STORAGE_PATH}/Images/BurstImage1.jpg
+rm %{INTERNAL_STORAGE_PATH}/Images/BurstImage2.jpg
+rm %{INTERNAL_STORAGE_PATH}/Images/BurstImage3.jpg
+rm %{INTERNAL_STORAGE_PATH}/Images/BurstImage4.jpg
+rm %{INTERNAL_STORAGE_PATH}/Videos/TestVideo.mp4
+rm %{INTERNAL_STORAGE_PATH}/Music/TestAudio.mp3
+chmod -R 700 %{INTERNAL_STORAGE_PATH}/Music
 
 %files
 %{APP_PATH}%{name}/*
old mode 100755 (executable)
new mode 100644 (file)
index 66744c3..db42e00
@@ -63,28 +63,25 @@ mkdir -p %{buildroot}/usr/share/license
 cp LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}%{APP_PATH}%{name}/data
 mkdir -p %{buildroot}%{APP_PATH}%{name}/data/tmp
-mkdir -p %{buildroot}/home/owner/content/P1
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}P1
 
-cp src/itc/media-vision/P1/09.jpg %{buildroot}/home/owner/content/P1
+cp src/itc/media-vision/P1/09.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}P1
 
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/track/sequence
 %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
-mkdir -p %{buildroot}/home/owner/content/res/mobile/track/sequence
-cp src/itc/media-vision/res/mobile/track/sequence/*.jpg %{buildroot}/home/owner/content/res/mobile/track/sequence/
+cp src/itc/media-vision/res/mobile/track/sequence/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/track/sequence/
 %endif
 
 %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
-mkdir -p %{buildroot}/home/owner/content/res/wearable/track/sequence
-cp src/itc/media-vision/res/wearable/track/sequence/*.jpg %{buildroot}/home/owner/content/res/wearable/track/sequence/
+cp src/itc/media-vision/res/wearable/track/sequence/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/track/sequence/
 %endif
 
 %if %{?DEVICE_BUILD_TYPE_TV:1}0
-mkdir -p %{buildroot}/home/owner/content/res/tv/track/sequence
-cp src/itc/media-vision/res/tv/track/sequence/*.jpg %{buildroot}/home/owner/content/res/tv/track/sequence/
+cp src/itc/media-vision/res/tv/track/sequence/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/track/sequence/
 %endif
 
 %if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
-mkdir -p %{buildroot}/home/owner/content/res/common_iot/track/sequence
-cp src/itc/media-vision/res/common_iot/track/sequence/*.jpg %{buildroot}/home/owner/content/res/tv/track/sequence/
+cp src/itc/media-vision/res/common_iot/track/sequence/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/track/sequence/
 %endif
 
 
@@ -105,18 +102,18 @@ mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
 #cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
 %post
 chmod -R 777 %{APP_PATH}%{name}/data
-chmod -R 777 /home/owner/content/res
+chmod -R 777 %{INTERNAL_STORAGE_PATH}res
 chown -R 5000:5000 %{APP_PATH}%{name}/data
-chown -R 5001:100 /home/owner/content/res
+chown -R 5001:100 %{INTERNAL_STORAGE_PATH}res
 chsmack -a %{name} %{APP_PATH}%{name}/data
-chsmack -a User::App::native.media-vision-itc /home/owner/content/P1
-chsmack -a User::App::native.media-vision-itc /home/owner/content/P1/*
-chsmack -a User::App::native.media-vision-itc /home/owner/content/res
-chsmack -a User::App::native.media-vision-itc /home/owner/content/res/*
-chsmack -a User::App::native.media-vision-itc /home/owner/content/res/track
-chsmack -a User::App::native.media-vision-itc /home/owner/content/res/track/*
-chsmack -a User::App::native.media-vision-itc /home/owner/content/res/track/sequence
-chsmack -a User::App::native.media-vision-itc /home/owner/content/res/track/sequence/*
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}P1
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}P1/*
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}res
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}res/*
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}res/track
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}res/track/*
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}res/track/sequence
+chsmack -a User::App::native.media-vision-itc %{INTERNAL_STORAGE_PATH}res/track/sequence/*
 %postun
 
 
@@ -124,4 +121,4 @@ chsmack -a User::App::native.media-vision-itc /home/owner/content/res/track/sequ
 %{APP_PATH}%{name}/*
 /usr/share/packages/native-%{MODULE_NAME}-itc.xml
 /usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}*
old mode 100755 (executable)
new mode 100644 (file)
index 58dd055..d595d95
@@ -57,15 +57,14 @@ cp LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/usr/share/packages/
 mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
-#cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
 
-mkdir -p %{buildroot}/home/owner/share
-cp src/itc/service-adaptor/Original.png %{buildroot}/home/owner/share/Original.png
+mkdir -p %{buildroot}%{DEVICE_SUITE_TARGET_30}
+cp src/itc/service-adaptor/Original.png %{buildroot}%{DEVICE_SUITE_TARGET_30}/Original.png
 
 %post
-chmod 777 /home/owner/share/Original.png
-chsmack -a User::App::Shared /home/owner/share/Original.png
-chsmack -e User::App::Shared /home/owner/share/Original.png
+chmod 777 %{DEVICE_SUITE_TARGET_30}/Original.png
+chsmack -a User::App::Shared %{DEVICE_SUITE_TARGET_30}/Original.png
+chsmack -e User::App::Shared %{DEVICE_SUITE_TARGET_30}/Original.png
 sqlite3 /opt/usr/dbspace/.media.db "UPDATE storage SET validity=1 WHERE storage_uuid='sample-plugin-for-tc';"
 
 %postun
@@ -75,5 +74,5 @@ sqlite3 /opt/usr/dbspace/.media.db "UPDATE storage SET validity=1 WHERE storage_
 %{APP_PATH}%{name}/*
 /usr/share/packages/native-%{MODULE_NAME}-itc.xml
 /usr/share/license/%{name}
-%attr(777,owner,users) /home/owner/share/Original.png
+%attr(777,owner,users) %{DEVICE_SUITE_TARGET_30}/Original.png
 
old mode 100755 (executable)
new mode 100644 (file)
index 1758c7c..fb3b24c
@@ -63,16 +63,10 @@ cp LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/usr/share/packages/
 mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
-#cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
-
-mkdir -p %{buildroot}/home/owner/content
-cp src/itc/shortcut/icon.png %{buildroot}/home/owner/content/icon.png
-
 mkdir -p %{buildroot}%{APP_PATH}%{name}/data
 
 %post
 chmod -R 777 %{APP_PATH}%{name}/data
-chmod -R 777 /home/owner/content/icon.png
 
 %postun
 pkgcmd -un org.tizen.shorcut_test &
@@ -82,4 +76,3 @@ pkgcmd -un org.tizen.shorcut_test &
 %{APP_PATH}%{name}/*
 /usr/share/packages/native-%{MODULE_NAME}-itc.xml
 /usr/share/license/%{name}
-/home/owner/content/*
old mode 100755 (executable)
new mode 100644 (file)
index 6c869ac..20fc000
@@ -66,115 +66,117 @@ cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
 mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
 #cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
 
-mkdir -p %{buildroot}/home/owner/content/model
-cp src/utc/capi-media-vision/res/rec/test_rec_model %{buildroot}/home/owner/content/model
-cp src/utc/capi-media-vision/res/track/test_trk_model %{buildroot}/home/owner/content/model
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}model
+cp src/utc/capi-media-vision/res/rec/test_rec_model %{buildroot}%{INTERNAL_STORAGE_PATH}model
+cp src/utc/capi-media-vision/res/track/test_trk_model %{buildroot}%{INTERNAL_STORAGE_PATH}model
 
-mkdir -p %{buildroot}/home/owner/content/res/img
-cp src/utc/capi-media-vision/res/media-vision-barcodes.json %{buildroot}/home/owner/content/res/
-cp src/utc/capi-media-vision/res/img/*.jpg %{buildroot}/home/owner/content/res/img/
-cp src/utc/capi-media-vision/res/img/*.raw %{buildroot}/home/owner/content/res/img/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/img
+cp src/utc/capi-media-vision/res/media-vision-barcodes.json %{buildroot}%{INTERNAL_STORAGE_PATH}res/
+cp src/utc/capi-media-vision/res/img/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/img/
+cp src/utc/capi-media-vision/res/img/*.raw %{buildroot}%{INTERNAL_STORAGE_PATH}res/img/
 
-mkdir -p %{buildroot}/home/owner/content/res/rec/P1
-mkdir -p %{buildroot}/home/owner/content/res/rec/P2
-cp src/utc/capi-media-vision/res/rec/P1/*.jpg %{buildroot}/home/owner/content/res/rec/P1
-cp src/utc/capi-media-vision/res/rec/P2/*.jpg %{buildroot}/home/owner/content/res/rec/P2
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/rec/P1
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/rec/P2
+cp src/utc/capi-media-vision/res/rec/P1/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/rec/P1
+cp src/utc/capi-media-vision/res/rec/P2/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/rec/P2
 
-mkdir -p %{buildroot}/home/owner/content/res/eye
-cp src/utc/capi-media-vision/res/eye/*.jpg %{buildroot}/home/owner/content/res/eye/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/eye
+cp src/utc/capi-media-vision/res/eye/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/eye/
 
-mkdir -p %{buildroot}/home/owner/content/res/expr
-cp src/utc/capi-media-vision/res/expr/*.jpg %{buildroot}/home/owner/content/res/expr/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/expr
+cp src/utc/capi-media-vision/res/expr/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/expr/
 
-mkdir -p %{buildroot}/home/owner/content/res/track/sequence
-cp src/utc/capi-media-vision/res/track/sequence/*.jpg %{buildroot}/home/owner/content/res/track/sequence/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/track/sequence
+cp src/utc/capi-media-vision/res/track/sequence/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/track/sequence/
 
-mkdir -p %{buildroot}/home/owner/content/res/facedetect
-cp src/utc/capi-media-vision/res/facedetect/*.jpg %{buildroot}/home/owner/content/res/facedetect/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/facedetect
+cp src/utc/capi-media-vision/res/facedetect/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/facedetect/
 
-mkdir -p %{buildroot}/home/owner/content/res/image
-cp src/utc/capi-media-vision/res/image/*.jpg %{buildroot}/home/owner/content/res/image/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/image
+cp src/utc/capi-media-vision/res/image/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/image/
 
-mkdir -p %{buildroot}/home/owner/content/res/image/tracking
-cp src/utc/capi-media-vision/res/image/tracking/*.jpg %{buildroot}/home/owner/content/res/image/tracking/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/image/tracking
+cp src/utc/capi-media-vision/res/image/tracking/*.jpg %{buildroot}%{INTERNAL_STORAGE_PATH}res/image/tracking/
 
-mkdir -p %{buildroot}/home/owner/content/res/surv
-cp src/utc/capi-media-vision/res/surv/* %{buildroot}/home/owner/content/res/surv/
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res/surv
+cp src/utc/capi-media-vision/res/surv/* %{buildroot}%{INTERNAL_STORAGE_PATH}res/surv/
 
 %post
-chmod -R 777 /home/owner/content/res
-chown -R 5001:100 /home/owner/content/res
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/img/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/img/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/img/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/img/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/image/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/image/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/image/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/image/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/rec/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/rec/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/rec/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/rec/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P1/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P1/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P1/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P1/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P2/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P2/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P2/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/rec/P2/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/eye/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/eye/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/eye/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/eye/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/expr/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/expr/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/expr/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/expr/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/track/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/track/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/track/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/track/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/facedetect/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/facedetect/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/facedetect/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/facedetect/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/track/sequence/
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/track/sequence/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/track/sequence/
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/track/sequence/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/image/tracking
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/image/tracking/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/image/tracking
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/image/tracking/*
-
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/surv
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/res/surv/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/surv
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/res/surv/*
-
-chmod -R 777 /home/owner/content/model
-chown -R 5001:100 /home/owner/content/model
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/model
-chsmack -a User::App::core.capi-media-vision-tests /home/owner/content/model/*
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/model
-chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/model/*
+chmod -R 777 %{INTERNAL_STORAGE_PATH}res
+chown -R 5001:100 %{INTERNAL_STORAGE_PATH}res
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/img/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/img/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/img/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/img/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P1/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P1/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P1/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P1/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P2/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P2/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P2/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/rec/P2/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/eye/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/eye/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/eye/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/eye/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/expr/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/expr/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/expr/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/expr/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/facedetect/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/facedetect/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/facedetect/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/facedetect/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/sequence/
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/sequence/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/sequence/
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/track/sequence/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/tracking
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/tracking/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/tracking
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/image/tracking/*
+
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/surv
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/surv/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/surv
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}res/surv/*
+
+chmod -R 777 %{INTERNAL_STORAGE_PATH}model
+chown -R 5001:100 %{INTERNAL_STORAGE_PATH}model
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}model
+chsmack -a User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}model/*
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}model
+chsmack -e User::App::core.capi-media-vision-tests %{INTERNAL_STORAGE_PATH}model/*
 %postun
 
 
@@ -182,4 +184,4 @@ chsmack -e User::App::core.capi-media-vision-tests /home/owner/content/model/*
 %{APP_PATH}%{name}/*
 /usr/share/packages/%{name}.xml
 /usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}*
old mode 100755 (executable)
new mode 100644 (file)
index aef993f..8423772
@@ -52,6 +52,8 @@ mkdir -p %{buildroot}/usr/share/license
 cp LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
+
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}/res
 %post
 
 %postun
old mode 100755 (executable)
new mode 100644 (file)
index 78ac999..a506581
@@ -55,7 +55,37 @@ mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
 mkdir -p %{buildroot}/usr/apps/%{name}/bin
 
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}res
+%if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+cp -rf src/utc/media-content/res/mobile/* %{buildroot}%{INTERNAL_STORAGE_PATH}res/
+%endif
+
+%if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+cp -rf src/utc/media-content/res/wearable/* %{buildroot}%{INTERNAL_STORAGE_PATH}res/
+%endif
+
+%if %{?DEVICE_BUILD_TYPE_TV:1}0
+cp -rf src/utc/media-content/res/tv/* %{buildroot}%{INTERNAL_STORAGE_PATH}res/
+%endif
+
+%if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
+cp -rf src/utc/media-content/res/common_iot/* %{buildroot}%{INTERNAL_STORAGE_PATH}res/
+%endif
+
+
+%post
+chmod -R 777 %{INTERNAL_STORAGE_PATH}res
+chown -R 5001:100 %{INTERNAL_STORAGE_PATH}res
+chsmack -a User::App::Shared %{INTERNAL_STORAGE_PATH}res
+chsmack -a User::App::Shared %{INTERNAL_STORAGE_PATH}res/*
+chsmack -a User::App::Shared %{INTERNAL_STORAGE_PATH}res/test
+chsmack -a User::App::Shared %{INTERNAL_STORAGE_PATH}res/test/*
+
+%postun
+rm -rf %{buildroot}%{INTERNAL_STORAGE_PATH}res
+
 %files
 /usr/apps/%{name}/*
 /usr/share/packages/%{name}.xml
 /usr/share/license/%{name}
+%{INTERNAL_STORAGE_PATH}*
old mode 100755 (executable)
new mode 100644 (file)
index 40c95f2..50148da
@@ -54,37 +54,37 @@ mkdir -p %{buildroot}/usr/share/license
 cp LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
-mkdir -p %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
+mkdir -p %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
 %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
-cp src/utc/metadata-editor/res/mobile/sample_audio.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/mobile/sample.jpg %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/mobile/sample_video.mp4 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/mobile/no_tag.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/mobile/id3tag_v1.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/mobile/sample_m4a.m4a %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/mobile/sample_audio.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/mobile/sample.jpg %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/mobile/sample_video.mp4 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/mobile/no_tag.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/mobile/id3tag_v1.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/mobile/sample_m4a.m4a %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
 %endif
 
 %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
-cp src/utc/metadata-editor/res/wearable/sample_audio.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/wearable/sample.jpg %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/wearable/sample_video.mp4 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/wearable/no_tag.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/wearable/id3tag_v1.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/wearable/sample_m4a.m4a %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/wearable/sample_audio.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/wearable/sample.jpg %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/wearable/sample_video.mp4 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/wearable/no_tag.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/wearable/id3tag_v1.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/wearable/sample_m4a.m4a %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
 %endif
 
 %if %{?DEVICE_BUILD_TYPE_TV:1}0
-cp src/utc/metadata-editor/res/tv/sample_audio.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/tv/sample.jpg %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/tv/sample_video.mp4 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/tv/no_tag.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/tv/id3tag_v1.mp3 %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
-cp src/utc/metadata-editor/res/tv/sample_m4a.m4a %{buildroot}/home/owner/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/tv/sample_audio.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/tv/sample.jpg %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/tv/sample_video.mp4 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/tv/no_tag.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/tv/id3tag_v1.mp3 %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+cp src/utc/metadata-editor/res/tv/sample_m4a.m4a %{buildroot}%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
 %endif
 
 %post
-chown -R 5001:100 /home/owner/apps_rw/core-metadata-editor-tests/data/
-chsmack -a User::App::core.metadata-editor-tests /home/owner/apps_rw/core-metadata-editor-tests/data/*
+chown -R 5001:100 %{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/
+chsmack -a User::App::core.metadata-editor-tests %{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/*
 
 %postun
 
@@ -92,4 +92,4 @@ chsmack -a User::App::core.metadata-editor-tests /home/owner/apps_rw/core-metada
 /usr/apps/%{name}/*
 /usr/share/packages/%{name}.xml
 /usr/share/license/%{name}
-/home/owner/apps_rw/core-metadata-editor-tests/data/*
+%{DEVICE_USER_30}/apps_rw/core-metadata-editor-tests/data/*
old mode 100755 (executable)
new mode 100644 (file)
index 9f73d65..b87bb6f
@@ -61,11 +61,11 @@ mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
 mkdir -p %{buildroot}/usr/apps/%{name}/bin
 #cp templates/external_wrapper.sh %{buildroot}/usr/apps/%{name}/bin
-mkdir -p %{buildroot}/home/owner/share
-cp src/utc/service-adaptor/Original.png %{buildroot}/home/owner/share/Original.png
+mkdir -p %{buildroot}%{DEVICE_SUITE_TARGET_30}
+cp src/utc/service-adaptor/Original.png %{buildroot}%{DEVICE_SUITE_TARGET_30}/Original.png
 
 %post
-chsmack -a User::App::Shared /home/owner/share/Original.png
+chsmack -a User::App::Shared %{DEVICE_SUITE_TARGET_30}/Original.png
 
 %postun
 
@@ -74,4 +74,4 @@ chsmack -a User::App::Shared /home/owner/share/Original.png
 /usr/apps/%{name}/*
 /usr/share/packages/%{name}.xml
 /usr/share/license/%{name}
-%attr(777,owner,users) /home/owner/share/Original.png
+%attr(777,owner,users) %{DEVICE_SUITE_TARGET_30}/Original.png
old mode 100755 (executable)
new mode 100644 (file)
index 8600f5a..db0f5b1
@@ -56,17 +56,17 @@ mkdir -p %{buildroot}/usr/share/license
 cp LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
-mkdir -p %{buildroot}/home/owner/content/res
-cp src/utc/streamrecorder/res/I420_352x288.yuv %{buildroot}/home/owner/content/res/I420_352x288.yuv
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}/res
+cp src/utc/streamrecorder/res/I420_352x288.yuv %{buildroot}%{INTERNAL_STORAGE_PATH}/res/I420_352x288.yuv
 
 %post
 
-chmod -R 777 /home/owner/content/res
-chown -R 5001:100 /home/owner/content/res
-chsmack -a User::App::core.streamrecorder-tests /home/owner/content/res
-chsmack -a User::App::core.streamrecorder-tests /home/owner/content/res/*
-chsmack -e User::App::core.streamrecorder-tests /home/owner/content/res
-chsmack -e User::App::core.streamrecorder-tests /home/owner/content/res/*
+chmod -R 777 %{INTERNAL_STORAGE_PATH}/res
+chown -R 5001:100 %{INTERNAL_STORAGE_PATH}/res
+chsmack -a User::App::core.streamrecorder-tests %{INTERNAL_STORAGE_PATH}/res
+chsmack -a User::App::core.streamrecorder-tests %{INTERNAL_STORAGE_PATH}/res/*
+chsmack -e User::App::core.streamrecorder-tests %{INTERNAL_STORAGE_PATH}/res
+chsmack -e User::App::core.streamrecorder-tests %{INTERNAL_STORAGE_PATH}/res/*
 
 %postun
 
@@ -75,4 +75,4 @@ chsmack -e User::App::core.streamrecorder-tests /home/owner/content/res/*
 /usr/apps/%{name}/*
 /usr/share/packages/%{name}.xml
 /usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}/*
old mode 100755 (executable)
new mode 100644 (file)
index 260b057..03041a0
@@ -52,12 +52,12 @@ mkdir -p %{buildroot}/usr/share/packages/
 cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
 mkdir -p %{buildroot}/usr/apps/%{name}/bin
 #cp templates/external_wrapper.sh %{buildroot}/usr/apps/%{name}/bin
-mkdir -p %{buildroot}/home/owner/content/res
-cp src/utc/wav-player/res/sound_5.wav %{buildroot}/home/owner/content/res/sound_5.wav
-chsmack -a User::App::core.wav-player-tests /home/owner/content/res
-chsmack -a User::App::core.wav-player-tests /home/owner/content/res/*
-chsmack -e User::App::core.wav-player-tests /home/owner/content/res
-chsmack -e User::App::core.wav-player-tests /home/owner/content/res/*
+mkdir -p %{buildroot}%{INTERNAL_STORAGE_PATH}/res
+cp src/utc/wav-player/res/sound_5.wav %{buildroot}%{INTERNAL_STORAGE_PATH}/res/sound_5.wav
+chsmack -a User::App::core.wav-player-tests %{INTERNAL_STORAGE_PATH}/res
+chsmack -a User::App::core.wav-player-tests %{INTERNAL_STORAGE_PATH}/res/*
+chsmack -e User::App::core.wav-player-tests %{INTERNAL_STORAGE_PATH}/res
+chsmack -e User::App::core.wav-player-tests %{INTERNAL_STORAGE_PATH}/res/*
 
 %post
 
@@ -68,4 +68,4 @@ chsmack -e User::App::core.wav-player-tests /home/owner/content/res/*
 /usr/apps/%{name}/*
 /usr/share/packages/%{name}.xml
 /usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}/*
old mode 100755 (executable)
new mode 100644 (file)
index 6102157..cdb565c
@@ -167,6 +167,7 @@ function update
 
 function build {
 APP_DIR=/usr/apps/
+INTERNAL_STORAGE_DIR=/home/owner/content/
 TAG_SPEC=$1
 PREFIX="native"
        if [ -n "$2" ]; then
@@ -190,6 +191,38 @@ PREFIX="native"
                                return;
                        fi
 
+                       # extract TCT configuration directory from TCT_CONFIG_FILE (/opt/tools/TCT_CONFIG)
+                       TCT_CONFIG_FILE=/opt/tools/TCT_CONFIG
+                       if [ ! -f $TCT_CONFIG_FILE ];then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "$TCT_CONFIG_FILE is not Found : Can Not Read TCT Configuration Directory"
+                               echo "STOPPING BUILD"
+                               echo "********************************************************************"
+                               echo ""
+                               return;
+                       fi
+                       DEVICE_SUITE_TARGET_30=`cat $TCT_CONFIG_FILE | grep DEVICE_SUITE_TARGET_30 | cut -f 2- -d '='`
+                       if [ $DEVICE_SUITE_TARGET_30 == "" ]; then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "Value for Key (DEVICE_SUITE_TARGET_30) is not found at $TCT_CONFIG_FILE : Can Not Locate TCT Configuration Directory"
+                               echo "STOPPING BUILD"
+                               echo "********************************************************************"
+                               echo ""
+                               return;
+                       fi
+                       DEVICE_USER_30=`cat $TCT_CONFIG_FILE | grep DEVICE_USER_30 | cut -f 2- -d '='`
+                       if [ $DEVICE_USER_30 == "" ]; then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "Value for Key (DEVICE_USER_30) is not found at $TCT_CONFIG_FILE : Can Not Locate TCT Configuration Directory"
+                               echo "STOPPING BUILD"
+                               echo "********************************************************************"
+                               echo ""
+                               return;
+                       fi
+
                        #native.h/core.h will be manual now, so commenting next two lines
                        #(cd src/$1/$2/; ../../../scripts/tcheadgen.sh tct-$2-$PREFIX.h)
                        #if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
@@ -209,25 +242,25 @@ PREFIX="native"
                        fi
                        if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
                                echo "DEVICE BUILD TYPE = MOBILE"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_MOBILE $BUILD_DEVICE_TYPE" -P device | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_MOBILE $BUILD_DEVICE_TYPE" -P device | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
                        if [ $BUILD_DEVICE_TYPE == "wearable" ]; then
                                echo "DEVICE BUILD TYPE = WEARABLE"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_WEARABLE $BUILD_DEVICE_TYPE" -P device | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_WEARABLE $BUILD_DEVICE_TYPE" -P device | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
                        if [ $BUILD_DEVICE_TYPE == "tv" ]; then
                                echo "DEVICE BUILD TYPE = TV"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_TV $BUILD_DEVICE_TYPE" -P device | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_TV $BUILD_DEVICE_TYPE" -P device | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
                        if [ $BUILD_DEVICE_TYPE == "common_iot" ]; then
                                echo "DEVICE BUILD TYPE = COMMON_IOT"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_COMMON_IOT $BUILD_DEVICE_TYPE" -P device | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_COMMON_IOT $BUILD_DEVICE_TYPE" -P device | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
@@ -443,6 +476,30 @@ function inst {
                                return;
                        fi
 
+                       # extract TCT configuration directory from TCT_CONFIG_FILE (/opt/tools/TCT_CONFIG)
+                       TCT_CONFIG_FILE=/opt/tools/TCT_CONFIG
+                       if [ ! -f $TCT_CONFIG_FILE ];then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "$TCT_CONFIG_FILE is not Found : Can Not Read TCT Configuration Directory"
+                               echo "STOPPING INSTALLATION"
+                               echo "********************************************************************"
+                               echo ""
+                               sleep 1
+                               return;
+                       fi
+                       DEVICE_SUITE_TARGET_30=`cat $TCT_CONFIG_FILE | grep DEVICE_SUITE_TARGET_30 | cut -f 2- -d '='`
+                       if [ $DEVICE_SUITE_TARGET_30 == "" ]; then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "Value for Key (DEVICE_SUITE_TARGET_30) is not found at $TCT_CONFIG_FILE : Can Not Locate TCT Configuration Directory"
+                               echo "STOPPING INSTALLATION"
+                               echo "********************************************************************"
+                               echo ""
+                               sleep 1
+                               return;
+                       fi
+
                        cd $PROJECT_DIR
                        # setting variables
                        BUILDTC_TYPE="$1"
@@ -502,7 +559,7 @@ function inst {
                        # inst.sh
                        echo "---- Generating /tmp/$TCT_DIR/inst.sh file"
                        sed -e "s:%{PKG_NAME}:\"$PKG_NAME\":g" -e "s:%{PKG_FULLNAME}:\"$PKG_FNAME\":g" \
-                           -e "s:%{PKG_DIR}:\"/home/owner/content/tct/$TCT_DIR\":g" -e "s:%{MOD_NAME}:\"$MOD_NAME\":g" \
+                           -e "s:%{PKG_DIR}:\"$DEVICE_SUITE_TARGET_30/tct/$TCT_DIR\":g" -e "s:%{MOD_NAME}:\"$MOD_NAME\":g" \
                            templates/tct-package/inst.sh > /tmp/$TCT_DIR/inst.sh
                        chmod a+x /tmp/$TCT_DIR/inst.sh
                        # itc.xml
old mode 100755 (executable)
new mode 100644 (file)
index 427478e..fd6fc65
@@ -167,6 +167,7 @@ function update
 
 function build {
 APP_DIR=/usr/apps/
+INTERNAL_STORAGE_DIR=/home/owner/content/
 TAG_SPEC=$1
 PREFIX="native"
        if [ -n "$2" ]; then
@@ -190,6 +191,39 @@ PREFIX="native"
                                return;
                        fi
 
+                       # extract TCT configuration directory from TCT_CONFIG_FILE (/opt/tools/TCT_CONFIG)
+                       TCT_CONFIG_FILE=/opt/tools/TCT_CONFIG
+                       if [ ! -f $TCT_CONFIG_FILE ];then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "$TCT_CONFIG_FILE is not Found : Can Not Read TCT Configuration Directory"
+                               echo "STOPPING BUILD"
+                               echo "********************************************************************"
+                               echo ""
+                               return;
+                       fi
+                       DEVICE_SUITE_TARGET_30=`cat $TCT_CONFIG_FILE | grep DEVICE_SUITE_TARGET_30 | cut -f 2- -d '='`
+                       if [ $DEVICE_SUITE_TARGET_30 == "" ]; then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "Value for Key (DEVICE_SUITE_TARGET_30) is not found at $TCT_CONFIG_FILE : Can Not Locate TCT Configuration Directory"
+                               echo "STOPPING BUILD"
+                               echo "********************************************************************"
+                               echo ""
+                               return;
+                       fi
+                       DEVICE_USER_30=`cat $TCT_CONFIG_FILE | grep DEVICE_USER_30 | cut -f 2- -d '='`
+                       if [ $DEVICE_USER_30 == "" ]; then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "Value for Key (DEVICE_USER_30) is not found at $TCT_CONFIG_FILE : Can Not Locate TCT Configuration Directory"
+                               echo "STOPPING BUILD"
+                               echo "********************************************************************"
+                               echo ""
+                               return;
+                       fi
+
+
                        #native.h/core.h will be manual now, so commenting next two lines
                        #(cd src/$1/$2/; ../../../scripts/tcheadgen.sh tct-$2-$PREFIX.h)
                        #if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
@@ -209,25 +243,25 @@ PREFIX="native"
                        fi
                        if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
                                echo "DEVICE BUILD TYPE = MOBILE"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_MOBILE $BUILD_DEVICE_TYPE" -P sdk | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_MOBILE $BUILD_DEVICE_TYPE" -P sdk | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
                        if [ $BUILD_DEVICE_TYPE == "wearable" ]; then
                                echo "DEVICE BUILD TYPE = WEARABLE"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_WEARABLE $BUILD_DEVICE_TYPE" -P sdk | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_WEARABLE $BUILD_DEVICE_TYPE" -P sdk | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
                        if [ $BUILD_DEVICE_TYPE == "tv" ]; then
                                echo "DEVICE BUILD TYPE = TV"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_TV $BUILD_DEVICE_TYPE" -P sdk | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_TV $BUILD_DEVICE_TYPE" -P sdk | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
                        if [ $BUILD_DEVICE_TYPE == "common_iot" ]; then
                                echo "DEVICE BUILD TYPE = COMMON_IOT"
-                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "DEVICE_BUILD_TYPE_COMMON_IOT $BUILD_DEVICE_TYPE" -P sdk | \
+                               gbs --conf $TCCONF build -A $ARCH --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" --define "INTERNAL_STORAGE_PATH $INTERNAL_STORAGE_DIR" --define "DEVICE_SUITE_TARGET_30 $DEVICE_SUITE_TARGET_30" --define "DEVICE_USER_30 $DEVICE_USER_30" --define "DEVICE_BUILD_TYPE_COMMON_IOT $BUILD_DEVICE_TYPE" -P sdk | \
                            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
                                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
                        fi
@@ -443,6 +477,30 @@ function inst {
                                return;
                        fi
 
+                       # extract TCT configuration directory from TCT_CONFIG_FILE (/opt/tools/TCT_CONFIG)
+                       TCT_CONFIG_FILE=/opt/tools/TCT_CONFIG
+                       if [ ! -f $TCT_CONFIG_FILE ];then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "$TCT_CONFIG_FILE is not Found : Can Not Read TCT Configuration Directory"
+                               echo "STOPPING INSTALLATION"
+                               echo "********************************************************************"
+                               echo ""
+                               sleep 1
+                               return;
+                       fi
+                       DEVICE_SUITE_TARGET_30=`cat $TCT_CONFIG_FILE | grep DEVICE_SUITE_TARGET_30 | cut -f 2- -d '='`
+                       if [ $DEVICE_SUITE_TARGET_30 == "" ]; then
+                               echo ""
+                               echo "****************FATAL ERROR***************************"
+                               echo "Value for Key (DEVICE_SUITE_TARGET_30) is not found at $TCT_CONFIG_FILE : Can Not Locate TCT Configuration Directory"
+                               echo "STOPPING INSTALLATION"
+                               echo "********************************************************************"
+                               echo ""
+                               sleep 1
+                               return;
+                       fi
+
                        cd $PROJECT_DIR
                        # setting variables
                        BUILDTC_TYPE="$1"
@@ -502,7 +560,7 @@ function inst {
                        # inst.sh
                        echo "---- Generating /tmp/$TCT_DIR/inst.sh file"
                        sed -e "s:%{PKG_NAME}:\"$PKG_NAME\":g" -e "s:%{PKG_FULLNAME}:\"$PKG_FNAME\":g" \
-                           -e "s:%{PKG_DIR}:\"/home/owner/content/tct/$TCT_DIR\":g" -e "s:%{MOD_NAME}:\"$MOD_NAME\":g" \
+                           -e "s:%{PKG_DIR}:\"$DEVICE_SUITE_TARGET_30/tct/$TCT_DIR\":g" -e "s:%{MOD_NAME}:\"$MOD_NAME\":g" \
                            templates/tct-package/inst.sh > /tmp/$TCT_DIR/inst.sh
                        chmod a+x /tmp/$TCT_DIR/inst.sh
                        # itc.xml
old mode 100755 (executable)
new mode 100644 (file)
index 6b733e6..07bf934
@@ -20,6 +20,21 @@ if [[ -z $1 ]]; then
     exit 1
 fi
 
+TCT_CONFIG_FILE=/opt/tools/TCT_CONFIG
+if [ ! -f $TCT_CONFIG_FILE ];then
+       echo "****************FATAL ERROR***************************"
+       echo "$TCT_CONFIG_FILE is not Found : Can Not Generate Test Case Location"
+       echo "********************************************************************"
+       exit 1;
+fi
+DEVICE_SUITE_TARGET_30=`cat $TCT_CONFIG_FILE | grep DEVICE_SUITE_TARGET_30 | cut -f 2- -d '='`
+if [ $DEVICE_SUITE_TARGET_30 == "" ]; then
+       echo "****************FATAL ERROR***************************"
+       echo "Value for Key (DEVICE_SUITE_TARGET_30) is not found at $TCT_CONFIG_FILE : Can Not Generate Test Case Location"
+       echo "********************************************************************"
+       exit 1;
+fi
+
 MODULE_NAME=$1
 BUILD_TYPE=$3
 DEVICE_TYPE=$4
@@ -40,7 +55,7 @@ if [ -a $TFILE ]; then
 fi
 
 function gen {
-    awk -F',' -v MODULE_NAME=$MODULE_NAME -v PREFIX=$PREFIX -v TAG_SPEC=$TAG_SPEC -v BUILD_TYPE=$BUILD_TYPE -v MODULE_NAME_C=$MODULE_NAME_C '
+    awk -F',' -v DEVICE_SUITE_TARGET_30=$DEVICE_SUITE_TARGET_30 -v MODULE_NAME=$MODULE_NAME -v PREFIX=$PREFIX -v TAG_SPEC=$TAG_SPEC -v BUILD_TYPE=$BUILD_TYPE -v MODULE_NAME_C=$MODULE_NAME_C '
     BEGIN {
         set = ""
 print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
@@ -63,7 +78,7 @@ print "    <set name=\"" set "\">";
 
 print "      <testcase component=\"NativeAPI/" MODULE_NAME_C "/" set "\" execution_type=\"auto\" id=\"" tcname "\" purpose=\"" tcpurpose "\">";
 print "        <description>";
-print "          <test_script_entry test_script_expected_result=\"0\">/home/owner/content/external_wrapper.sh " MODULE_NAME " " tcname " " BUILD_TYPE "</test_script_entry>";
+print "          <test_script_entry test_script_expected_result=\"0\">" DEVICE_SUITE_TARGET_30 "/external_wrapper.sh " MODULE_NAME " " tcname " " BUILD_TYPE "</test_script_entry>";
 print "        </description>";
 print "      </testcase>";
     }
old mode 100755 (executable)
new mode 100644 (file)
index 94848ba..faa3bb5
@@ -4,6 +4,7 @@ IF( DEFINED MODULE )
        SET(MEMORYCHECK 0)
        SET(DEBUGVAL 0)
        SET(CONFIGFILEPATH "\"/tmp/TC_Config.txt\"")
+       SET(TCT_CONFIG "\"/tmp/TCT_CONFIG\"")
        SET(ERR_LOG "\"/tmp/tclog\"")
        SET(ERR_UTC_LOG "\"/tmp/utclog\"")
        SET(TIME_INTERVAL 500)
@@ -39,6 +40,7 @@ ENDIF()
        add_definitions(-DMEMORY_CHECK=${MEMORYCHECK})
        add_definitions(-DDEBUG=${DEBUGVAL})
        add_definitions(-DCONFIGFILE_PATH=${CONFIGFILEPATH})
+       add_definitions(-DTCT_CONFIG=${TCT_CONFIG})
        add_definitions(-DERR_LOG=${ERR_LOG})
        add_definitions(-DERR_UTC_LOG=${ERR_UTC_LOG})
        SET(COMMON_FILE "../../common/tct_common.c")
old mode 100755 (executable)
new mode 100644 (file)
index a168b49..3d3b8a0
@@ -143,3 +143,76 @@ bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue, char* pstrModu
        strcpy(pstrValue, pszValue);
        return true;
 }
+
+
+
+
+/**
+* @function            GetValueForTCTSetting
+* @description         Get the corresponding value for a key from TCT_CONFIG file
+* @parameter           pstrKeyString : Key, pstrValue : Value
+* @return                      true for success, false for failure
+*/ 
+bool GetValueForTCTSetting(char* pstrKeyString, char* pstrValue, char* pstrModule)
+{
+       if ( NULL == pstrKeyString )
+       {
+               FPRINTF("[Line : %d][%s] The key string provided to fetch config file value is null\\n", __LINE__, pstrModule);
+               return false;
+       }
+
+
+       FILE* pfilePtr = fopen(TCT_CONFIG, "r");
+       if ( NULL == pfilePtr )
+       {
+               FPRINTF("[Line : %d][%s] Unable to open configuration file : %s\\n", __LINE__, pstrModule, TCT_CONFIG);
+               return false;
+       }
+
+       char* pszKey = NULL;
+       char* pszValue = NULL;
+       char* pszDelim = "=\n";
+       char szConfigLine[CONFIG_LINE_LEN_MAX] = {0,};
+
+       while ( !feof(pfilePtr) )
+       {
+               if ( fgets(szConfigLine, CONFIG_LINE_LEN_MAX, pfilePtr) != NULL )
+               {
+                       pszKey = strtok(szConfigLine, pszDelim);
+                       pszValue = strtok(NULL, pszDelim);
+                       if ( NULL == pszKey )
+                       {
+                               FPRINTF("[Line : %d][%s] Null key value pszKey \\n", __LINE__,pstrModule);
+                               fclose(pfilePtr);
+                               return false;
+                       }
+                       if ( 0 == strcmp(pszKey, pstrKeyString) )
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][%s][Key = %s;Config value = %s]\\n", __LINE__, pstrModule, pszKey, pszValue);
+#endif
+                               break;
+                       }
+
+                       pszKey = NULL;
+                       pszValue = NULL;
+               }
+       }
+
+       fclose(pfilePtr);
+       if ( NULL == pszValue )
+       {
+               FPRINTF("[Line : %d][%s][Key = %s;Unable to retrieve config value for this key. Check key at config file location : %s]\\n", __LINE__, pstrModule, pstrKeyString, TCT_CONFIG);
+               return false;
+       }
+
+       if (strlen(pszValue) >= CONFIG_VALUE_LEN_MAX )
+       {
+               FPRINTF("[Line : %d][%s][Key = %s;Config Value should be less than %d characters in length]\\n", __LINE__, pstrModule, pszKey, CONFIG_VALUE_LEN_MAX);
+               return false;
+       }
+
+       memset(pstrValue, 0, CONFIG_VALUE_LEN_MAX);
+       strcpy(pstrValue, pszValue);
+       return true;
+}
old mode 100755 (executable)
new mode 100644 (file)
index c8350b6..a5c5a05
@@ -178,4 +178,5 @@ else \
 bool TCTCheckSystemInfoFeatureSupported(char* pszKey, char* pszModuleName);
 char* TCTSystemInfoGetError(int nRet);
 bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue, char* pstrModule);
+bool GetValueForTCTSetting(char* pstrKeyString, char* pstrValue, char* pstrModule);
 #endif // _TCT_COMMON_H_
old mode 100755 (executable)
new mode 100644 (file)
index 5750d89..035f000
 #define AVG_BPS 1031
 #define MAX_BPS 2063
 
-const char *g_pszFilePath = "/home/owner/content/res/Ice.mp4";
+const char *g_pszFilePath = NULL;
 media_format_h vfmt_encoded;
 media_streamer_h streamer;
 
 
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) 
+{
+       if (type == STORAGE_TYPE_INTERNAL) {
+               g_pszFilePath=(char*)calloc(strlen(path)+strlen("/res/Ice.mp4")+1, sizeof(char));
+               snprintf(g_pszFilePath, strlen(path)+strlen("/res/Ice.mp4")+1, "%s/res/Ice.mp4", path);
+
+               return false;
+       }
+       return true;
+}
+
+
 
 /**
 * @function            MediaStreamerGetError
@@ -56,6 +68,8 @@ void CTs_platform_permission_media_streamer_startup(void)
                remove(ERR_LOG);
        }
 
+       storage_foreach_device_supported(storage_device_cb,NULL);
+
        nRetVal = media_streamer_create(&streamer);
        if(nRetVal < 0)
        {
@@ -100,6 +114,11 @@ void CTs_platform_permission_media_streamer_cleanup(void)
                return;
        }
 
+       if (g_pszFilePath) {
+               free(g_pszFilePath);
+               g_pszFilePath = NULL;
+       }
+
        return;
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index cb40259..839d9b6
 #define APPKEY                                 "native-service-adaptor-client-itc"
 #define APPSECRET                              "Test"
 #define ROOTPATH                               "/"
-#define ACTUAL_FILE_PATH        "/home/owner/share/Original.png"
 #define UPLOAD_PATH                            "/Original.png"
-#define DOWNLOAD_PATH                  "/home/owner/share/Download.png"
 #define STRING_LENGTH                  1024
 #define PATH_LEN                               1024
 #define TIMEOUT                                        15000
 
+const char *g_pszACTUAL_FILE_PATH = NULL;
+const char *g_pszDOWNLOAD_PATH = NULL;
+
 bool g_bServiceAdaptorCreation;
 bool g_bCallbackHit;
 int WAIT_TIMEOUT_IN_SEC = 15;
@@ -357,9 +358,9 @@ void sync_context_destroy(sync_context_h sync_context)
 bool RemoveFile(void)
 {
        struct stat buf;
-       if ( stat(DOWNLOAD_PATH, &buf) == 0 )
+       if ( stat(g_pszDOWNLOAD_PATH, &buf) == 0 )
        {
-               remove(DOWNLOAD_PATH);
+               remove(g_pszDOWNLOAD_PATH);
        }
 
        sync_context_h sync_context = sync_context_create();
@@ -391,7 +392,7 @@ bool UploadFile(void)
        RemoveFile();
 
        
-       nRet = service_storage_create_upload_task(g_hServicePlugin, ACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
+       nRet = service_storage_create_upload_task(g_hServicePlugin, g_pszACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
        PRINT_RESULT(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_upload_task", ServiceAdaptorGetError(nRet));
        FPRINTF("[Line : %d][%s] UPLOAD_PATH = (%s)\\n", __LINE__, API_NAMESPACE, UPLOAD_PATH);
 
@@ -428,15 +429,33 @@ bool UploadFile(void)
 */
 void CTs_platform_permission_ServiceAdaptorClient_startup(void)
 {
-    struct stat stBuff;
-    if ( stat(ERR_LOG, &stBuff) == 0 )
-    {
-        remove(ERR_LOG);
-    }
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
 
 #if DEBUG
-    FPRINTF("[Line : %d][%s] TEST SUIT start-up: CTs_platform_permission_ServiceAdaptorClient_p\\n", __LINE__, API_NAMESPACE);
+           FPRINTF("[Line : %d][%s] TEST SUIT start-up: CTs_platform_permission_ServiceAdaptorClient_p\\n", __LINE__, API_NAMESPACE);
 #endif
+
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               
+               int path_size = strlen(pszValue)+strlen("/Original.png")+1;
+               g_pszACTUAL_FILE_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszACTUAL_FILE_PATH, path_size, "%s/Original.png", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/Download.png")+1;
+               g_pszDOWNLOAD_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszDOWNLOAD_PATH, path_size, "%s/Download.png", pszValue);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
 }
 
 /**
@@ -448,9 +467,21 @@ void CTs_platform_permission_ServiceAdaptorClient_startup(void)
 void CTs_platform_permission_ServiceAdaptorClient_cleanup(void)
 {
 #if DEBUG
-    FPRINTF("[Line : %d][%s] TEST SUIT clean-up: CTs_platform_permission_ServiceAdaptorClient_p\\n", __LINE__, API_NAMESPACE);
+           FPRINTF("[Line : %d][%s] TEST SUIT clean-up: CTs_platform_permission_ServiceAdaptorClient_p\\n", __LINE__, API_NAMESPACE);
 #endif
-    return;
+
+       if (g_pszACTUAL_FILE_PATH) {
+               free(g_pszACTUAL_FILE_PATH);
+               g_pszACTUAL_FILE_PATH = NULL;
+       }       
+
+       if (g_pszDOWNLOAD_PATH) {
+               free(g_pszDOWNLOAD_PATH);
+               g_pszDOWNLOAD_PATH = NULL;
+       }
+
+
+       return;
 }
 
 
@@ -480,7 +511,7 @@ int CTc_ServiceAdaptorClient_PrivilegeInternet(void)
 
        //RemoveFile();
 
-       nRet = service_storage_create_upload_task(g_hServicePlugin, ACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
+       nRet = service_storage_create_upload_task(g_hServicePlugin, g_pszACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
        PRINT_RESULT_ERROR_NONE(TIZEN_ERROR_PERMISSION_DENIED, nRet, "service_storage_create_upload_task", ServiceAdaptorGetError(nRet),service_storage_destroy_task(hTask);StopServicePlugin(),SERVICE_ADAPTOR_ERROR_NONE);
        
        StopServicePlugin();
@@ -516,7 +547,7 @@ int CTc_ServiceAdaptorClient_PrivilegeInternet_service_storage_create_download_t
        //nRet = UploadFile();
        //PRINT_RESULT_CLEANUP(0, nRet, "UploadFile ", "Returned Value not correct", StopServicePlugin());
 
-       nRet = service_storage_create_download_task(g_hServicePlugin, UPLOAD_PATH, DOWNLOAD_PATH, &hTask);
+       nRet = service_storage_create_download_task(g_hServicePlugin, UPLOAD_PATH, g_pszDOWNLOAD_PATH, &hTask);
        PRINT_RESULT_ERROR_NONE(TIZEN_ERROR_PERMISSION_DENIED, nRet, "service_storage_create_download_task", ServiceAdaptorGetError(nRet),service_storage_destroy_task(hTask);StopServicePlugin(),SERVICE_ADAPTOR_ERROR_NONE);
        
        StopServicePlugin();
@@ -552,7 +583,7 @@ int CTc_ServiceAdaptorClient_PrivilegeInternet_service_storage_create_download_t
        //nRet = UploadFile();
        //PRINT_RESULT_CLEANUP(0, nRet, "UploadFile ", "Returned Value not correct", StopServicePlugin());
 
-       nRet = service_storage_create_download_thumbnail_task(g_hServicePlugin, UPLOAD_PATH, DOWNLOAD_PATH, 0, &hTask);
+       nRet = service_storage_create_download_thumbnail_task(g_hServicePlugin, UPLOAD_PATH, g_pszDOWNLOAD_PATH, 0, &hTask);
        PRINT_RESULT_ERROR_NONE(TIZEN_ERROR_PERMISSION_DENIED, nRet, "service_storage_create_download_thumbnail_task", ServiceAdaptorGetError(nRet),service_storage_destroy_task(hTask);StopServicePlugin(),SERVICE_ADAPTOR_ERROR_NONE);
                
        StopServicePlugin();
old mode 100755 (executable)
new mode 100644 (file)
index 03fad66..1149636
@@ -22,7 +22,7 @@
 *  @{
 */
 
-const char *g_pszFilePath = "/home/owner/content/res/Ice.mp4";
+const char *g_pszFilePath = NULL;
 
 /**
  * @function           ITs_capi_media_streamer_startup
@@ -39,6 +39,19 @@ void ITs_capi_media_streamer_startup(void)
                remove(ERR_LOG);
        }
 
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               int path_size = strlen(pszValue)+strlen("/res/Ice.mp4")+1;
+               g_pszFilePath=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszFilePath, path_size, "%s/res/Ice.mp4", pszValue);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        nRetVal = media_streamer_create(&streamer);
        if(nRetVal < 0)
        {
@@ -83,6 +96,12 @@ void ITs_capi_media_streamer_cleanup(void)
                return;
        }
 
+       if (g_pszFilePath) {
+               free(g_pszFilePath);
+               g_pszFilePath = NULL;
+       }       
+
+
        return;
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 0ac6e92..12cff95
@@ -73,25 +73,6 @@ void mediademuxer_eos_callback(int track_index, void *user_data)
 
 }
 
-/**
- * @function           storage_device_cb
- * @description                Called to fill the file path.
- * @parameter          storage id, type, state, path, user_data.
- * @return                     NA
- */
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data){
-       if(type==STORAGE_TYPE_INTERNAL)
-       {
-               g_file_path=(char*)malloc(strlen(path)+ strlen( user_data ) + 6);
-               sprintf(g_file_path, "%s/res/%s", path, (char*)user_data );
-               return false;
-       }
-       else{
-               FPRINTF("[Line : %d][%s] STORAGE_TYPE_INTERNAL is false\\n", __LINE__, API_NAMESPACE);
-       }
-       return true;
-}
-
 
 /**
  * @function           ITs_mediademuxer_startup
@@ -111,10 +92,16 @@ void ITs_mediademuxer_startup(void)
 #endif
        if(g_uri == NULL)
        {
-               if(storage_foreach_device_supported(storage_device_cb, "sample.mp4") != STORAGE_ERROR_NONE)
+               char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+               if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+               {
+                       FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+                       g_file_path=(char*)malloc(strlen(pszValue)+ strlen( "sample.mp4" ) + 6);
+                       sprintf(g_file_path, "%s/res/%s", pszValue, "sample.mp4" );
+               }
+               else
                {
-                       FPRINTF("[Line : %d][%s] Start up error\\n", __LINE__, API_NAMESPACE);
-                       return;
+                       FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
                }
                g_uri = g_file_path;
        }
@@ -133,6 +120,13 @@ void ITs_mediademuxer_cleanup(void)
 #if DEBUG
        FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Mediademuxer_p\\n", __LINE__, API_NAMESPACE);
 #endif
+
+       if(g_file_path)
+       {
+               free(g_file_path);
+               g_file_path = NULL;
+               g_uri = NULL;
+       }
 }
 
 /** @addtogroup itc-mediademuxer-testcases
old mode 100755 (executable)
new mode 100644 (file)
index 6ae11af..3479d8c
@@ -44,26 +44,7 @@ gboolean Timeout_Function(gpointer data)
  *  @ingroup itc
  *  @{
  */
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
 
-       if(type==STORAGE_TYPE_INTERNAL) {
-               if(g_h264_path == NULL){
-                       g_h264_path=(char*)malloc(strlen(path)+ strlen( g_h264_file ) + 6);
-                       sprintf(g_h264_path, "%s/res/%s", path, g_h264_file );
-               }
-               if(g_h264_data_path == NULL){
-                       g_h264_data_path=(char*)malloc(strlen(path)+ strlen( g_h264_data_file ) + 6);
-                       sprintf(g_h264_data_path, "%s/res/%s", path, g_h264_data_file );
-               }
-               if(g_file_path == NULL){
-                       g_file_path=(char*)malloc(strlen(path)+ strlen( g_file ) + 6);
-                       sprintf(g_file_path, "%s/res/%s", path, g_file );
-               }
-               return false;
-       }
-
-       return true;
-}
 
 /**
  * @function           mediamuxer_error_callback
@@ -100,10 +81,29 @@ void ITs_mediamuxer_startup(void)
 #if DEBUG
        FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Mediamuxer_p\\n", __LINE__, API_NAMESPACE);
 #endif
-       if(storage_foreach_device_supported(storage_device_cb, NULL) != STORAGE_ERROR_NONE)
+
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
        {
-               FPRINTF("[Line : %d][%s] Startup error at storage_foreach_device_supported", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               if(g_h264_path == NULL){
+                       g_h264_path=(char*)malloc(strlen(pszValue)+ strlen( g_h264_file ) + 6);
+                       sprintf(g_h264_path, "%s/res/%s", pszValue, g_h264_file );
+               }
+               if(g_h264_data_path == NULL){
+                       g_h264_data_path=(char*)malloc(strlen(pszValue)+ strlen( g_h264_data_file ) + 6);
+                       sprintf(g_h264_data_path, "%s/res/%s", pszValue, g_h264_data_file );
+               }
+               if(g_file_path == NULL){
+                       g_file_path=(char*)malloc(strlen(pszValue)+ strlen( g_file ) + 6);
+                       sprintf(g_file_path, "%s/res/%s", pszValue, g_file );
+               }
        }
+       else
+       {
+               FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        if(g_uri == NULL)
                g_uri = g_file_path;
        g_bMediamuxerCreation = true;
@@ -120,6 +120,18 @@ void ITs_mediamuxer_cleanup(void)
 #if DEBUG
        FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Mediamuxer_p\\n", __LINE__, API_NAMESPACE);
 #endif
+
+       if(g_h264_path)
+       {
+               free(g_h264_path);
+               g_h264_path = NULL;
+       }
+
+       if(g_h264_data_path)
+       {
+               free(g_h264_data_path);
+               g_h264_data_path = NULL;
+       }
 }
 
 /** @addtogroup itc-mediamuxer-testcases
old mode 100755 (executable)
new mode 100644 (file)
index f280057..f8223bb
@@ -31,6 +31,7 @@
 #include <jpeglib.h>
 #include <mv_surveillance.h>
 #include <image_util.h>
+#include <storage.h>
 
 //#include <json/json.h>
 
old mode 100755 (executable)
new mode 100644 (file)
index 48185ab..14be590
 
 static mv_face_tracking_model_h hTrackingModel = NULL;
 static bool lost_flag = false;
-static const char *track_seq_path = "/home/owner/content/res/track/sequence";
-static char *track_prep_frame_path = "/home/owner/content/res/track/sequence/01.jpg";
+static const char *track_seq_path = "NULL";
+static char *track_prep_frame_path = "NULL";
+static char* pInternalStoragePath=NULL;
+
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) 
+{
+       if (type == STORAGE_TYPE_INTERNAL) {
+               pInternalStoragePath = (char*)calloc(strlen(path)+1, sizeof(char));
+               snprintf(pInternalStoragePath, strlen(path)+1, "%s", path);
+
+               track_seq_path=(char*)calloc(strlen(path)+strlen("/res/track/sequence")+1, sizeof(char));
+               snprintf(track_seq_path, strlen(path)+strlen("/res/track/sequence")+1, "%s/res/track/sequence", path);
+
+               track_prep_frame_path=(char*)calloc(strlen(path)+strlen("/res/track/sequence/01.jpg")+1, sizeof(char));
+               snprintf(track_prep_frame_path, strlen(path)+strlen("/res/track/sequence/01.jpg")+1, "%s/res/track/sequence/01.jpg", path);
+
+               return false;
+       }
+       return true;
+}
+
 
 /****************************************************Callback Start****************************************************/
 /**
@@ -191,18 +210,20 @@ void MediaVisionCreateModel()
  */
 void ITs_media_vision_face_startup(void)
 {
-    struct stat stBuff;
-    if ( stat(ERR_LOG, &stBuff) == 0 )
-    {
-        remove(ERR_LOG);
-    }
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
 
-    g_bMediavisionFaceRecognitionModelCreation = false;
+       g_bMediavisionFaceRecognitionModelCreation = false;
        g_bMismatch = false;
        g_bIsFaceRecognitionFeatureSupported = TCTCheckSystemInfoFeatureSupported(FACERECOGFEATURE, API_NAMESPACE);
        g_bIsBarcodeGenerationFeatureSupported = TCTCheckSystemInfoFeatureSupported(BARCODEGENFEATURE, API_NAMESPACE);
        g_bIsBarcodeDetectionFeatureSupported = TCTCheckSystemInfoFeatureSupported(BARCODEDETFEATURE, API_NAMESPACE);
 
+       storage_foreach_device_supported(storage_device_cb,NULL);
+
     return;
 }
 
@@ -219,7 +240,23 @@ void ITs_media_vision_face_cleanup(void)
                mv_face_recognition_model_destroy(g_hRecognitionModel);
                g_hRecognitionModel = NULL;
        }
-    return;
+
+       if (pInternalStoragePath) {
+               free(pInternalStoragePath);
+               pInternalStoragePath = NULL;
+       }
+
+       if (track_seq_path) {
+               free(track_seq_path);
+               track_seq_path = NULL;
+       }
+
+       if (track_prep_frame_path) {
+               free(track_prep_frame_path);
+               track_prep_frame_path = NULL;
+       }
+
+       return;
 }
 
 /** @addtogroup itc-media-vision-testcases
@@ -719,10 +756,12 @@ int ITc_mv_face_tracking_model_prepare_p(void)
        PRINT_RESULT(MEDIA_VISION_ERROR_NONE, nRet, "mv_create_source", MediaVisionGetError(nRet));
     CHECK_HANDLE(g_hMvSource, "mv_create_source");
 
-    nRet = image_load("/home/owner/content/res/track/sequence/01.jpg", g_hMvSource);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/track/sequence/01.jpg")+1, "%s/res/track/sequence/01.jpg", pInternalStoragePath);
+    nRet = image_load(pszValue, g_hMvSource);
     PRINT_RESULT(MEDIA_VISION_ERROR_NONE, nRet, "image_load", MediaVisionGetError(nRet));
        
-       nRet = mv_face_tracking_model_create(&hTrackingModel);
+    nRet = mv_face_tracking_model_create(&hTrackingModel);
     PRINT_RESULT(MEDIA_VISION_ERROR_NONE, nRet, "mv_face_tracking_model_create", MediaVisionGetError(nRet));
 
     mv_quadrangle_s roi;
@@ -970,7 +1009,9 @@ int ITc_mv_face_recognize_p(void)
     nRet = mv_create_source(&source);
     PRINT_RESULT(MEDIA_VISION_ERROR_NONE, nRet, "mv_create_source", MediaVisionGetError(nRet));
 
-    nRet = image_load( "/home/owner/content/P1/09.jpg", source);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/P1/09.jpg")+1, "%s/P1/09.jpg", pInternalStoragePath);
+    nRet = image_load( pszValue, source);
     PRINT_RESULT(MEDIA_VISION_ERROR_NONE, nRet, "image_load", MediaVisionGetError(nRet));
 
     nRet = mv_face_recognize(source, recognition_model, NULL, NULL, MvFaceRecognizedCB, &is_called);
@@ -1024,7 +1065,9 @@ int ITc_mv_face_track_p(void)
        PRINT_RESULT(MEDIA_VISION_ERROR_NONE, nRet, "mv_create_source", MediaVisionGetError(nRet));
     CHECK_HANDLE(g_hMvSource, "mv_create_source");
 
-    nRet = image_load("/home/owner/content/res/track/sequence/01.jpg", g_hMvSource);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/track/sequence/01.jpg")+1, "%s/res/track/sequence/01.jpg", pInternalStoragePath);
+    nRet = image_load(pszValue, g_hMvSource);
     PRINT_RESULT(MEDIA_VISION_ERROR_NONE, nRet, "image_load", MediaVisionGetError(nRet));
        
     mv_quadrangle_s roi;
old mode 100755 (executable)
new mode 100644 (file)
index 5bafd64..6770fc7
@@ -20,6 +20,9 @@
 *  @{
 */
 
+extern const char *g_pszACTUAL_FILE_PATH;
+extern const char *g_pszDOWNLOAD_PATH;
+
 //Add helper function definitions here
 
 /**
@@ -207,9 +210,9 @@ bool StopServicePlugin(void)
 bool RemoveFile(void)
 {
        struct stat buf;
-       if ( stat(DOWNLOAD_PATH, &buf) == 0 )
+       if ( stat(g_pszDOWNLOAD_PATH, &buf) == 0 )
        {
-               remove(DOWNLOAD_PATH);
+               remove(g_pszDOWNLOAD_PATH);
        }
 
        sync_context_h sync_context = sync_context_create();
@@ -237,7 +240,7 @@ bool UploadFile(void)
 
        RemoveFile();
 
-       nRet = service_storage_create_upload_task(g_hServicePlugin, ACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
+       nRet = service_storage_create_upload_task(g_hServicePlugin, g_pszACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
        PRINT_RESULT(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_upload_task", ServiceAdaptorGetError(nRet));
        FPRINTF("[Line : %d][%s] UPLOAD_PATH = (%s)\\n", __LINE__, API_NAMESPACE, UPLOAD_PATH);
 
@@ -367,7 +370,7 @@ bool DownloadFile(void)
        PRINT_RESULT(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_file_get_physical_path", ServiceAdaptorGetError(nRet));
        CHECK_HANDLE(pszPath, "service_storage_file_get_physical_path");
 
-       nRet = service_storage_create_download_task(g_hServicePlugin, pszPath, DOWNLOAD_PATH, &hTask);
+       nRet = service_storage_create_download_task(g_hServicePlugin, pszPath, g_pszDOWNLOAD_PATH, &hTask);
        PRINT_RESULT_CLEANUP(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_download_task ", ServiceAdaptorGetError(nRet), FREE_MEMORY(pszPath));
 
        sync_context_h sync_context = sync_context_create();
old mode 100755 (executable)
new mode 100644 (file)
index 7734ce0..9912e7c
@@ -37,9 +37,7 @@
 #define APPKEY                         "native-service-adaptor-itc"
 #define APPSECRET                      "Test"
 #define ROOTPATH                       "/"
-#define ACTUAL_FILE_PATH               "/home/owner/share/Original.png"
 #define UPLOAD_PATH                    "/Original.png"
-#define DOWNLOAD_PATH                  "/home/owner/share/Download.png"
 #define STRING_LENGTH                  1024
 #define PATH_LEN                       1024
 #define TIMEOUT                                15000
old mode 100755 (executable)
new mode 100644 (file)
index c949bd0..f4ab343
@@ -22,6 +22,9 @@
 
 //& set: ServiceAdaptor
 
+extern const char *g_pszACTUAL_FILE_PATH;
+extern const char *g_pszDOWNLOAD_PATH;
+
 /****************************************************Callback Start****************************************************/
 
 /**
@@ -194,6 +197,24 @@ void ITs_service_adaptor_storage_startup(void)
        FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_ServiceAdaptor_p\\n", __LINE__, API_NAMESPACE);
 #endif
 
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               
+               int path_size = strlen(pszValue)+strlen("/Original.png")+1;
+               g_pszACTUAL_FILE_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszACTUAL_FILE_PATH, path_size, "%s/Original.png", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/Download.png")+1;
+               g_pszDOWNLOAD_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszDOWNLOAD_PATH, path_size, "%s/Download.png", pszValue);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        g_bServiceAdaptorCreation = true;
 }
 
@@ -208,6 +229,16 @@ void ITs_service_adaptor_storage_cleanup(void)
 #if DEBUG
        FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_ServiceAdaptor_p\\n", __LINE__, API_NAMESPACE);
 #endif
+
+       if (g_pszACTUAL_FILE_PATH) {
+               free(g_pszACTUAL_FILE_PATH);
+               g_pszACTUAL_FILE_PATH = NULL;
+       }       
+
+       if (g_pszDOWNLOAD_PATH) {
+               free(g_pszDOWNLOAD_PATH);
+               g_pszDOWNLOAD_PATH = NULL;
+       }
 }
 
 
@@ -244,7 +275,7 @@ int ITc_service_storage_create_destroy_upload_task_p(void)
 
        RemoveFile();
 
-       nRet = service_storage_create_upload_task(g_hServicePlugin, ACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
+       nRet = service_storage_create_upload_task(g_hServicePlugin, g_pszACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
        PRINT_RESULT_CLEANUP(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_upload_task", ServiceAdaptorGetError(nRet), StopServicePlugin());
        if(NULL == hTask)
        {
@@ -289,7 +320,7 @@ int ITc_service_storage_start_cancel_task_p(void)
 
        RemoveFile();
 
-       nRet = service_storage_create_upload_task(g_hServicePlugin, ACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
+       nRet = service_storage_create_upload_task(g_hServicePlugin, g_pszACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
        PRINT_RESULT_CLEANUP(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_upload_task", ServiceAdaptorGetError(nRet), StopServicePlugin());
        if(NULL == hTask)
        {
@@ -343,7 +374,7 @@ int ITc_service_storage_set_unset_task_progress_cb_p(void)
        RemoveFile();
 
 //     sync_context_h sync_context = sync_context_create();
-       nRet = service_storage_create_upload_task(g_hServicePlugin, ACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
+       nRet = service_storage_create_upload_task(g_hServicePlugin, g_pszACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
        PRINT_RESULT_CLEANUP(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_upload_task", ServiceAdaptorGetError(nRet), StopServicePlugin());
        if(NULL == hTask)
        {
@@ -407,7 +438,7 @@ int ITc_service_storage_set_unset_task_state_changed_cb_p(void)
 
        RemoveFile();
 
-       nRet = service_storage_create_upload_task(g_hServicePlugin, ACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
+       nRet = service_storage_create_upload_task(g_hServicePlugin, g_pszACTUAL_FILE_PATH, UPLOAD_PATH, &hTask);
        PRINT_RESULT_CLEANUP(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_upload_task", ServiceAdaptorGetError(nRet), StopServicePlugin());
        if(NULL == hTask)
        {
@@ -475,7 +506,7 @@ int ITc_service_storage_create_destroy_download_task_p(void)
        nRet = UploadFile();
        PRINT_RESULT_CLEANUP(0, nRet, "UploadFile ", "Returned Value not correct", StopServicePlugin());
 
-       nRet = service_storage_create_download_task(g_hServicePlugin, UPLOAD_PATH, DOWNLOAD_PATH, &hTask);
+       nRet = service_storage_create_download_task(g_hServicePlugin, UPLOAD_PATH, g_pszDOWNLOAD_PATH, &hTask);
        PRINT_RESULT_CLEANUP(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_download_task ", ServiceAdaptorGetError(nRet), StopServicePlugin());
        if(NULL == hTask)
        {
@@ -564,7 +595,7 @@ int ITc_service_storage_create_destroy_download_thumbnail_task_p(void)
        nRet = UploadFile();
        PRINT_RESULT_CLEANUP(0, nRet, "UploadFile ", "Returned Value not correct", StopServicePlugin());
 
-       nRet = service_storage_create_download_thumbnail_task(g_hServicePlugin, UPLOAD_PATH, DOWNLOAD_PATH, 0, &hTask);
+       nRet = service_storage_create_download_thumbnail_task(g_hServicePlugin, UPLOAD_PATH, g_pszDOWNLOAD_PATH, 0, &hTask);
        PRINT_RESULT_CLEANUP(SERVICE_ADAPTOR_ERROR_NONE, nRet, "service_storage_create_download_thumbnail_task", ServiceAdaptorGetError(nRet), StopServicePlugin());
        if(NULL == hTask)
        {
old mode 100755 (executable)
new mode 100644 (file)
index 8d4a4ba..c6c40ce
 
 //& set: ServiceAdaptor
 
+
+const char *g_pszACTUAL_FILE_PATH = NULL;
+const char *g_pszDOWNLOAD_PATH = NULL;
+
+
 /****************************************************Callback Start****************************************************/
 
 /**
@@ -60,6 +65,24 @@ void ITs_service_adaptor_startup(void)
        FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_ServiceAdaptor_p\\n", __LINE__, API_NAMESPACE);
 #endif
 
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               
+               int path_size = strlen(pszValue)+strlen("/Original.png")+1;
+               g_pszACTUAL_FILE_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszACTUAL_FILE_PATH, path_size, "%s/Original.png", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/Download.png")+1;
+               g_pszDOWNLOAD_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszDOWNLOAD_PATH, path_size, "%s/Download.png", pszValue);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        g_bServiceAdaptorCreation = true;
 }
 
@@ -74,6 +97,17 @@ void ITs_service_adaptor_cleanup(void)
 #if DEBUG
        FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_ServiceAdaptor_p\\n", __LINE__, API_NAMESPACE);
 #endif
+
+       if (g_pszACTUAL_FILE_PATH) {
+               free(g_pszACTUAL_FILE_PATH);
+               g_pszACTUAL_FILE_PATH = NULL;
+       }       
+
+       if (g_pszDOWNLOAD_PATH) {
+               free(g_pszDOWNLOAD_PATH);
+               g_pszDOWNLOAD_PATH = NULL;
+       }       
+
 }
 
 
old mode 100755 (executable)
new mode 100644 (file)
index c1aa4dc..10399ed
@@ -40,7 +40,6 @@ bool g_bRequestCBCallbackHit;
 bool g_b2CallbackValueCheck;
 
 #define API_NAMESPACE                          "SHORTCUT_ITC"
-#define ICON_PATH                                      "/home/owner/content/icon.png"
 #define TEST_SHORTCUT_APPID                    "org.tizen.shortcut_test"
 #define TIMEOUT_CB                                     15000
 #define SHORTCUTPERIOD                         -1.0f
old mode 100755 (executable)
new mode 100644 (file)
index b50f329..37a6f8f
@@ -22,6 +22,8 @@
 *  @{
 */
 
+const char *g_pszICON_PATH = NULL;
+
 /*********************************************************CallBack Start*********************************************************/
 /**
  * @function           ShortcutAddToHomeWidgetCB
@@ -245,6 +247,20 @@ void ITs_shortcut_startup(void)
 #if DEBUG
        FPRINTF("[Line: %d][%s] TEST SUIT start-up: ITs_Shortcut_p\\n", __LINE__, API_NAMESPACE);
 #endif
+
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               int path_size = strlen(pszValue)+strlen("/icon.png")+1;
+               g_pszICON_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszICON_PATH, path_size, "%s/icon.png", pszValue);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        TCT_CheckInstalledApp(1, TEST_SHORTCUT_APPID);
        elm_init(0, NULL);
        return;
@@ -264,6 +280,12 @@ void ITs_shortcut_cleanup(void)
 #endif
 
        elm_shutdown();
+
+       if (g_pszICON_PATH) {
+               free(g_pszICON_PATH);
+               g_pszICON_PATH = NULL;
+       }
+
        return;
 }
 
@@ -304,7 +326,7 @@ int ITc_shortcut_add_to_home_p(void)
        nRet = shortcut_set_request_cb(ShortcutRequestCB, TESTSTRING);
        PRINT_RESULT(SHORTCUT_ERROR_NONE, nRet, "shortcut_set_request_cb", ShortcutError(nRet));
 
-       nRet = shortcut_add_to_home(pszName, LAUNCH_BY_APP, TEST_SHORTCUT_APPID, ICON_PATH, DUPLICATEALLOWED, ShortcutAddToHomeCB, TESTSTRING);
+       nRet = shortcut_add_to_home(pszName, LAUNCH_BY_APP, TEST_SHORTCUT_APPID, g_pszICON_PATH, DUPLICATEALLOWED, ShortcutAddToHomeCB, TESTSTRING);
        RUN_POLLING_LOOP;
        PRINT_RESULT(SHORTCUT_ERROR_NONE, nRet, "shortcut_add_to_home", ShortcutError(nRet));
        CHECK_CALLBACK_STATUS("shortcut_add_to_home", g_bCallbackHit, g_bRequestCBCallbackHit);
@@ -364,7 +386,7 @@ int ITc_shortcut_add_to_home_widget_p(void)
                nRet = shortcut_set_request_cb(ShortcutRequestCB, TESTSTRING);
                PRINT_RESULT(SHORTCUT_ERROR_NONE, nRet, "shortcut_set_request_cb", ShortcutError(nRet));
 
-               nRet = shortcut_add_to_home_widget(pszName, eShortcutWidgetSize[enum_counter1], TEST_SHORTCUT_APPID, ICON_PATH, SHORTCUTPERIOD, DUPLICATEALLOWED, ShortcutAddToHomeWidgetCB, TESTSTRING);
+               nRet = shortcut_add_to_home_widget(pszName, eShortcutWidgetSize[enum_counter1], TEST_SHORTCUT_APPID, g_pszICON_PATH, SHORTCUTPERIOD, DUPLICATEALLOWED, ShortcutAddToHomeWidgetCB, TESTSTRING);
                RUN_POLLING_LOOP;
                PRINT_RESULT(SHORTCUT_ERROR_NONE, nRet, "shortcut_add_to_home_widget", ShortcutError(nRet));
                CHECK_CALLBACK_STATUS("shortcut_add_to_home_widget", g_bCallbackHit, g_bRequestCBCallbackHit);
@@ -404,7 +426,7 @@ int ITc_shortcut_set_request_cb_p(void)
        nRet = shortcut_set_request_cb(ShortcutRequestCB, TESTSTRING);
        PRINT_RESULT(SHORTCUT_ERROR_NONE, nRet, "shortcut_set_request_cb", ShortcutError(nRet));
 
-       nRet = shortcut_add_to_home(pszName, LAUNCH_BY_APP, TEST_SHORTCUT_APPID, ICON_PATH, DUPLICATEALLOWED, ShortcutAddToHomeCB, TESTSTRING);
+       nRet = shortcut_add_to_home(pszName, LAUNCH_BY_APP, TEST_SHORTCUT_APPID, g_pszICON_PATH, DUPLICATEALLOWED, ShortcutAddToHomeCB, TESTSTRING);
        RUN_POLLING_LOOP;
        PRINT_RESULT(SHORTCUT_ERROR_NONE, nRet, "shortcut_add_to_home", ShortcutError(nRet));
        CHECK_CALLBACK_STATUS("shortcut_set_request_cb", g_bCallbackHit, g_bRequestCBCallbackHit);
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/itc/shortcut/icon.png
rename to src/itc/shortcut/res/mobile/icon.png
diff --git a/src/itc/shortcut/res/wearable/icon.png b/src/itc/shortcut/res/wearable/icon.png
new file mode 100644 (file)
index 0000000..95c189d
Binary files /dev/null and b/src/itc/shortcut/res/wearable/icon.png differ
old mode 100755 (executable)
new mode 100644 (file)
index e9584fe..58f3be1
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/db)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/record)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/helper)
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index 24e309b..6795742
 #include "utc-calendar-helper-attendee.h"
 #include "utc-calendar-helper-extended.h"
 
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[CALENDAR-SERVICE2]"
+
 #define UTC_VCALENDAR_STREAM_MAX 10
 #define UTC_VCALENDAR_TZID "Australia/Adelaide"
 
@@ -40,16 +44,6 @@ static int g_startup_err = CALENDAR_ERROR_NONE;
 static char *ics_file = "cal-tc.ics";
 static char *ics_path = NULL;
 
-static bool storage_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
-{
-       if(type == STORAGE_TYPE_INTERNAL) {
-               int ics_path_len = strlen(path) + strlen(ics_file) + 6;
-               ics_path = (char*)malloc(ics_path_len);
-               snprintf(ics_path, ics_path_len, "%s/res/%s", path, ics_file);
-               return false;
-       }
-       return true;
-}
 
 /**
  * @function           utc_calendar_vcalendar_startup
@@ -66,8 +60,17 @@ void utc_calendar_vcalendar_startup(void)
        }
        _clean_db();
 
-       if(storage_foreach_device_supported(storage_supported_cb, NULL) != STORAGE_ERROR_NONE) {
-               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               int ics_path_len = strlen(pszValue) + strlen(ics_file) + 6;
+               ics_path = (char*)malloc(ics_path_len);
+               snprintf(ics_path, ics_path_len, "%s/res/%s", pszValue, ics_file);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
        }
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 545db23..2ada427
@@ -30,7 +30,7 @@ INCLUDE_DIRECTORIES(
     ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
     bundle
old mode 100755 (executable)
new mode 100644 (file)
index 1473e96..b5d58a1
@@ -25,6 +25,8 @@
 #include <system_info.h>
 #include <image_util.h>
 #include <json-glib/json-glib.h>
+#include <storage.h>
+#include "tct_common.h"
 
 #define DESCRIPTION_FIELD_SIZE 1024
 #define MESSAGE_FIELD_SIZE 7100
@@ -54,7 +56,7 @@ static mv_engine_config_h engine_config = NULL;
 static bool _is_broken_source = false;
 static bool _is_broken_config = false;
 
-static const char *test_path = "/home/owner/content/res";
+static const char *test_path = NULL;
 static const char *conf_file = "media-vision-barcodes.json";
 static const char *json_gen_img_pos_section = "gen_positive";
 static const char *json_gen_img_neg_section = "gen_img_negative";
@@ -79,6 +81,16 @@ static int det_p2_n = 0;
 static struct barcode_model *det_cs_models_p = NULL;
 static int det_cs_p_n = 0;
 
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
+                       if (type == STORAGE_TYPE_INTERNAL) {
+                               int path_size = strlen(path)+sizeof(char)*5;
+                               test_path=(char*)calloc(path_size, sizeof(char));
+                               snprintf(test_path, path_size, "%s/res", path);
+                               return false;
+                       }
+                       return true;
+}
+
 // Helpers:
 
 static mv_barcode_type_e convert_str_type(const char *str_type)
@@ -588,6 +600,8 @@ void utc_capi_media_vision_barcode_startup(void)
     system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_detection", &isBarcodeDetectionSupported);
     system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_generation", &isBarcodeGenerationSupported);
 
+    storage_foreach_device_supported(storage_device_cb,NULL);
+
     if (isBarcodeDetectionSupported || isBarcodeGenerationSupported)
         isVisionSupported = true;
     else
@@ -693,6 +707,11 @@ void utc_capi_media_vision_barcode_cleanup(void)
         det_cs_models_p = NULL;
     }
 
+    if (test_path) {
+               free(test_path);
+               test_path = NULL;
+       }
+
     printf("capi-media-vision tests CLEANUP is completed\n");
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 14a4ae1..1bf08c8
@@ -24,6 +24,8 @@
 
 #include <image_util.h>
 #include <system_info.h>
+#include <storage.h>
+#include "tct_common.h"
 
 #define FILE_PATH_SIZE 1024
 
@@ -32,23 +34,53 @@ static int gStartupError;
 
 static mv_source_h *p1_face_examples = NULL;
 static unsigned int p1_face_examples_n = 10;
-const char *p1_face_examples_dir = "/home/owner/content/res/rec/P1";
+const char *p1_face_examples_dir = NULL;
 
 static mv_source_h *p2_face_examples = NULL;
 static unsigned int p2_face_examples_n = 10;
-const char *p2_face_examples_dir = "/home/owner/content/res/rec/P2";
+const char *p2_face_examples_dir = NULL;
 
 static mv_face_tracking_model_h tracking_model = NULL;
-static const char *track_seq_path = "/home/owner/content/res/track/sequence";
-static char *track_prep_frame_path = "/home/owner/content/res/track/sequence/01.jpg";
+static const char *track_seq_path = NULL;
+static char *track_prep_frame_path = NULL;
 
-static const char* path_to_trk_model = "/home/owner/content/model/test_trk_model";
-static const char* path_to_rec_model = "/home/owner/content/model/test_rec_model";
+static const char* path_to_trk_model = NULL;
+static const char* path_to_rec_model = NULL;
 
 static bool is_eye_condition_cb_called = false;
 static bool is_facial_expression_cb_called = false;
 static bool is_face_detected_cb_called = false;
 
+static char* pInternalStoragePath=NULL;
+
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
+                       if (type == STORAGE_TYPE_INTERNAL) {
+                               pInternalStoragePath = (char*)calloc(strlen(path)+1, sizeof(char));
+                               snprintf(pInternalStoragePath, strlen(path)+1, "%s", path);
+
+                               p1_face_examples_dir=(char*)calloc(strlen(path)+strlen("/res/rec/P1")+1, sizeof(char));
+                               snprintf(p1_face_examples_dir, strlen(path)+strlen("/res/rec/P1")+1, "%s/res/rec/P1", path);
+                               
+                               p2_face_examples_dir=(char*)calloc(strlen(path)+strlen("/res/rec/P2")+1, sizeof(char));
+                               snprintf(p2_face_examples_dir, strlen(path)+strlen("/res/rec/P2")+1, "%s/res/rec/P2", path);
+
+                               track_seq_path=(char*)calloc(strlen(path)+strlen("/res/track/sequence")+1, sizeof(char));
+                               snprintf(track_seq_path, strlen(path)+strlen("/res/track/sequence")+1, "%s/res/track/sequence", path);
+
+                               track_prep_frame_path=(char*)calloc(strlen(path)+strlen("/res/track/sequence/01.jpg")+1, sizeof(char));
+                               snprintf(track_prep_frame_path, strlen(path)+strlen("/res/track/sequence/01.jpg")+1, "%s/res/track/sequence/01.jpg", path);
+
+                               path_to_trk_model=(char*)calloc(strlen(path)+strlen("/model/test_trk_model")+1, sizeof(char));
+                               snprintf(path_to_trk_model, strlen(path)+strlen("/model/test_trk_model")+1, "%s/model/test_trk_model", path);
+
+                               path_to_rec_model=(char*)calloc(strlen(path)+strlen("/model/test_rec_model")+1, sizeof(char));
+                               snprintf(path_to_rec_model, strlen(path)+strlen("/model/test_rec_model")+1, "%s/model/test_rec_model", path);
+
+                               return false;
+                       }
+                       return true;
+}
+
 static bool check_model_files(
         const char *file_name_src,
         const char *file_name_dst)
@@ -261,6 +293,8 @@ void utc_capi_media_vision_face_startup(void)
     else
         isVisionSupported = false;
 
+    storage_foreach_device_supported(storage_device_cb,NULL);
+
     if (NULL == tracking_model)
     {
         gStartupError = mv_face_tracking_model_create(&tracking_model);
@@ -286,23 +320,58 @@ void utc_capi_media_vision_face_startup(void)
  */
 void utc_capi_media_vision_face_cleanup(void)
 {
-    printf("capi-media-vision mv_face tests CLEANUP is launched\n");
-
-    if (NULL != tracking_model)
-    {
-        const int ret = mv_face_tracking_model_destroy(tracking_model);
-        if (MEDIA_VISION_ERROR_NONE != ret)
-        {
-            printf("Global tracking model has NOT been destroyed.\n");
-        }
-        else
-        {
-            printf("Global tracking model has been destroyed.\n");
-        }
-        tracking_model = NULL;
-    }
-
-    printf("capi-media-vision mv_face tests CLEANUP is completed\n");
+       printf("capi-media-vision mv_face tests CLEANUP is launched\n");
+
+       if (NULL != tracking_model)
+       {
+               const int ret = mv_face_tracking_model_destroy(tracking_model);
+               if (MEDIA_VISION_ERROR_NONE != ret)
+               {
+                   printf("Global tracking model has NOT been destroyed.\n");
+               }
+               else
+               {
+                   printf("Global tracking model has been destroyed.\n");
+               }
+               tracking_model = NULL;
+       }
+
+       if (pInternalStoragePath) {
+               free(pInternalStoragePath);
+               pInternalStoragePath = NULL;
+       }
+
+       if (p1_face_examples_dir) {
+               free(p1_face_examples_dir);
+               p1_face_examples_dir = NULL;
+       }
+
+       if (p2_face_examples_dir) {
+               free(p2_face_examples_dir);
+               p2_face_examples_dir = NULL;
+       }
+
+       if (track_seq_path) {
+               free(track_seq_path);
+               track_seq_path = NULL;
+       }
+
+       if (track_prep_frame_path) {
+               free(track_prep_frame_path);
+               track_prep_frame_path = NULL;
+       }
+
+       if (path_to_trk_model) {
+               free(path_to_trk_model);
+               path_to_trk_model = NULL;
+       }
+
+       if (path_to_rec_model) {
+               free(path_to_rec_model);
+               path_to_rec_model = NULL;
+       }       
+
+       printf("capi-media-vision mv_face tests CLEANUP is completed\n");
 }
 
 static int cmpstringp(const void *p1, const void *p2)
@@ -816,7 +885,7 @@ int utc_mediavision_mv_face_track_p(void)
     printf("%i\n", frames_counter);
     qsort(&frames[0], frames_counter, FILE_PATH_SIZE, cmpstringp);
 
-    track_prep_frame_path = frames[0];
+    //track_prep_frame_path = frames[0];
     assert_eq(0, utc_mediavision_mv_face_tracking_model_prepare_p());
 
     mv_source_h source = NULL;
@@ -838,7 +907,6 @@ int utc_mediavision_mv_face_track_p(void)
     }
 
     free(frames);
-    track_prep_frame_path = "/home/owner/content/res/track/sequence/01.jpg";
 
     ret = mv_destroy_source(source);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
@@ -941,9 +1009,9 @@ int utc_mediavision_mv_face_recognize_p(void)
     ret = mv_create_source(&source);
     assert_neq(NULL, source);
 
-    ret = load_image_to_media_source(
-                  "/home/owner/content/res/rec/P1/09.jpg",
-                  source);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/rec/P1/09.jpg")+1, "%s/res/rec/P1/09.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
     bool is_called = false;
@@ -989,8 +1057,9 @@ int utc_mediavision_mv_face_recognize_n(void)
     ret = mv_create_source(&source);
     assert_neq(NULL, source);
 
-    ret = load_image_to_media_source("/home/owner/content/res/rec/P1/09.jpg",
-                                     source);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/rec/P1/09.jpg")+1, "%s/res/rec/P1/09.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,source);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
     // empty source:
@@ -1138,16 +1207,24 @@ int utc_mediavision_mv_face_eye_condition_recognize_p(void)
     ret = mv_create_source(&source4);
     assert_neq(NULL, source4);
 
-    ret = load_image_to_media_source("/home/owner/content/res/eye/01.jpg", source1);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/eye/01.jpg")+1, "%s/res/eye/01.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source1);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
-    ret = load_image_to_media_source("/home/owner/content/res/eye/02.jpg", source2);
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/eye/02.jpg")+1, "%s/res/eye/02.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source2);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
-    ret = load_image_to_media_source("/home/owner/content/res/eye/03.jpg", source3);
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/eye/03.jpg")+1, "%s/res/eye/03.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source3);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
-    ret = load_image_to_media_source("/home/owner/content/res/eye/04.jpg", source4);
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/eye/04.jpg")+1, "%s/res/eye/04.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source4);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
     // open
@@ -1268,7 +1345,9 @@ int utc_mediavision_mv_face_eye_condition_recognize_n(void)
     ret = mv_create_source(&source);
     assert_neq(NULL, source);
 
-    ret = load_image_to_media_source("/home/owner/content/res/eye/01.jpg", source);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/eye/01.jpg")+1, "%s/res/eye/01.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
     ret = mv_face_eye_condition_recognize(
@@ -1341,10 +1420,14 @@ int utc_mediavision_mv_face_facial_expression_recognize_p(void)
     ret = mv_create_source(&source2);
     assert_neq(NULL, source2);
 
-    ret = load_image_to_media_source("/home/owner/content/res/expr/neutral.jpg", source1);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/expr/neutral.jpg")+1, "%s/res/expr/neutral.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source1);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
-    ret = load_image_to_media_source("/home/owner/content/res/expr/smile.jpg", source2);
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/expr/smile.jpg")+1, "%s/res/expr/smile.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source2);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
     face_expression = MV_FACE_NEUTRAL;
@@ -1446,7 +1529,9 @@ int utc_mediavision_mv_face_facial_expression_recognize_n(void)
     ret = mv_create_source(&source);
     assert_neq(NULL, source);
 
-    ret = load_image_to_media_source("/home/owner/content/res/expr/neutral.jpg", source);
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/expr/neutral.jpg")+1, "%s/res/expr/neutral.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue, source);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
     ret = mv_face_facial_expression_recognize(
@@ -1683,14 +1768,18 @@ int utc_mediavision_mv_face_recognition_model_save_p(void)
     mv_source_h source1 = NULL;
     ret = mv_create_source(&source1);
     assert_neq(NULL, source1);
-    ret = load_image_to_media_source("/home/owner/content/res/rec/P1/09.jpg",
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/rec/P1/09.jpg")+1, "%s/res/rec/P1/09.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
                                      source1);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
     mv_source_h source2 = NULL;
     ret = mv_create_source(&source2);
     assert_neq(NULL, source2);
-    ret = load_image_to_media_source("/home/owner/content/res/rec/P2/00.jpg",
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/rec/P2/00.jpg")+1, "%s/res/rec/P2/00.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
                                      source2);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
@@ -1850,7 +1939,9 @@ int utc_mediavision_mv_face_recognition_model_add_p(void)
     mv_source_h source = NULL;
     ret = mv_create_source(&source);
     assert_neq(NULL, source);
-    ret = load_image_to_media_source("/home/owner/content/res/rec/P1/00.jpg",
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/rec/P1/00.jpg")+1, "%s/res/rec/P1/00.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
                                      source);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
@@ -1905,7 +1996,9 @@ int utc_mediavision_mv_face_recognition_model_add_n(void)
     mv_source_h source = NULL;
     ret = mv_create_source(&source);
     assert_neq(NULL, source);
-    ret = load_image_to_media_source("/home/owner/content/res/rec/P1/00.jpg",
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/rec/P1/00.jpg")+1, "%s/res/rec/P1/00.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
                                      source);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
@@ -2330,23 +2423,27 @@ int utc_mediavision_mv_face_detect_p(void)
     ret = mv_create_source(&source4);
     assert_neq(NULL, source4);
 
-    ret = load_image_to_media_source(
-              "/home/owner/content/res/facedetect/face1.jpg",
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/facedetect/face1.jpg")+1, "%s/res/facedetect/face1.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
               source1);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
-    ret = load_image_to_media_source(
-              "/home/owner/content/res/facedetect/face2.jpg",
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/facedetect/face2.jpg")+1, "%s/res/facedetect/face2.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
               source2);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
-    ret = load_image_to_media_source(
-              "/home/owner/content/res/facedetect/face3.jpg",
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/facedetect/face3.jpg")+1, "%s/res/facedetect/face3.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
               source3);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
-    ret = load_image_to_media_source(
-              "/home/owner/content/res/facedetect/face6.jpg",
+    memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/facedetect/face6.jpg")+1, "%s/res/facedetect/face6.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
               source4);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
@@ -2414,8 +2511,9 @@ int utc_mediavision_mv_face_detect_n(void)
     ret = mv_create_source(&source1);
     assert_neq(NULL, source1);
 
-    ret = load_image_to_media_source(
-              "/home/owner/content/res/facedetect/face1.jpg",
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/facedetect/face1.jpg")+1, "%s/res/facedetect/face1.jpg", pInternalStoragePath);
+    ret = load_image_to_media_source(pszValue,
               source1);
     assert_eq(MEDIA_VISION_ERROR_NONE, ret);
 
old mode 100755 (executable)
new mode 100644 (file)
index d6a4874..d47f75c
@@ -24,6 +24,8 @@
 
 #include <image_util.h>
 #include <system_info.h>
+#include <storage.h>
+#include "tct_common.h"
 
 #define FILE_PATH_SIZE 1024
 
@@ -32,13 +34,30 @@ static int gStartupError;
 
 static mv_engine_config_h g_engine_config = NULL;
 
-const char *target_image_source_path = "/home/owner/content/res/image/target.jpg";
-const char *scene_image_source_path = "/home/owner/content/res/image/scene.jpg";
-const char *tracking_squence_path = "/home/owner/content/res/image/tracking/frame";
+const char *target_image_source_path = NULL;
+const char *scene_image_source_path = NULL;
+const char *tracking_squence_path = NULL;
 const int tracking_squence_size = 22;
 const char *tracking_frame_type = ".jpg";
 const char *image_object_serizalization_path = "/tmp/image_object.txt";
 
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
+                       if (type == STORAGE_TYPE_INTERNAL) {
+                               target_image_source_path=(char*)calloc(strlen(path)+strlen("/res/image/target.jpg")+1, sizeof(char));
+                               snprintf(target_image_source_path, strlen(path)+strlen("/res/image/target.jpg")+1, "%s/res/image/target.jpg", path);
+
+                               scene_image_source_path=(char*)calloc(strlen(path)+strlen("/res/image/scene.jpg")+1, sizeof(char));
+                               snprintf(scene_image_source_path, strlen(path)+strlen("/res/image/scene.jpg")+1, "%s/res/image/scene.jpg", path);
+
+                               tracking_squence_path=(char*)calloc(strlen(path)+strlen("/res/image/tracking/frame")+1, sizeof(char));
+                               snprintf(tracking_squence_path, strlen(path)+strlen("/res/image/tracking/frame")+1, "%s/res/image/tracking/frame", path);
+
+                               return false;
+                       }
+                       return true;
+}
+
+
 static bool check_image_model_files(
         const char *file_name_src,
         const char *file_name_dst)
@@ -170,6 +189,8 @@ void utc_capi_media_vision_image_startup(void)
         isVisionSupported = true;
     else
         isVisionSupported = false;
+    
+    storage_foreach_device_supported(storage_device_cb,NULL);
 
     gStartupError = mv_create_engine_config(&g_engine_config);
     if (MEDIA_VISION_ERROR_NONE != gStartupError) {
@@ -189,14 +210,29 @@ void utc_capi_media_vision_image_startup(void)
  */
 void utc_capi_media_vision_image_cleanup(void)
 {
-    printf("capi-media-vision mv_image tests CLEANUP is launched\n");
+       printf("capi-media-vision mv_image tests CLEANUP is launched\n");
 
-    if (g_engine_config) {
-        mv_destroy_engine_config(g_engine_config);
-        g_engine_config = NULL;
-    }
+       if (g_engine_config) {
+               mv_destroy_engine_config(g_engine_config);
+               g_engine_config = NULL;
+       }
+
+       if (target_image_source_path) {
+               free(target_image_source_path);
+               target_image_source_path = NULL;
+       }
+
+       if (scene_image_source_path) {
+               free(scene_image_source_path);
+               scene_image_source_path = NULL;
+       }
+
+       if (tracking_squence_path) {
+               free(tracking_squence_path);
+               tracking_squence_path = NULL;
+       }
 
-    printf("capi-media-vision mv_image tests CLEANUP is completed\n");
+       printf("capi-media-vision mv_image tests CLEANUP is completed\n");
 }
 
 /**
old mode 100755 (executable)
new mode 100644 (file)
index 59086ec..59269c0
@@ -24,6 +24,8 @@
 #include <unistd.h>
 #include <image_util.h>
 #include <system_info.h>
+#include "tct_common.h"
+#include <storage.h>
 
 static bool isVisionSupported = false;
 static int gStartupError;
@@ -39,6 +41,18 @@ static mv_source_h source_recog;
 
 static mv_surveillance_result_h gEventResult = NULL;
 
+
+static char* pInternalStoragePath=NULL;
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
+                       if (type == STORAGE_TYPE_INTERNAL) {
+                               pInternalStoragePath = (char*)calloc(strlen(path)+1, sizeof(char));
+                               snprintf(pInternalStoragePath, strlen(path)+1, "%s", path);
+                               return false;
+                       }
+                       return true;
+}
+
+
 /**
  * @function            utc_capi_media_vision_surveillance_startup
  * @description         Called before each test
@@ -60,6 +74,8 @@ void utc_capi_media_vision_surveillance_startup(void)
        else
                isVisionSupported = false;
 
+       storage_foreach_device_supported(storage_device_cb,NULL);
+
        gStartupError = MEDIA_VISION_ERROR_NONE;
 
        gStartupError = mv_surveillance_event_trigger_create(
@@ -141,6 +157,11 @@ void utc_capi_media_vision_surveillance_cleanup(void)
        if (source_recog != NULL)
                mv_destroy_source(source_recog);
 
+       if (pInternalStoragePath) {
+               free(pInternalStoragePath);
+               pInternalStoragePath = NULL;
+       }
+
        movement_detected_trigger = NULL;
        person_appeared_trigger = NULL;
        person_recognized_trigger = NULL;
@@ -403,9 +424,11 @@ int utc_mediavision_mv_surveillance_subscribe_event_trigger_p(void)
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        /* MV_SURVEILLANCE_EVENT_PERSON_RECOGNIZED */
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/model.txt")+1, "%s/res/surv/model.txt", pInternalStoragePath);
        error = mv_engine_config_set_string_attribute(engine_cfg,
                        MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH,
-                       "/home/owner/content/res/surv/model.txt");
+                       pszValue);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        error = mv_surveillance_subscribe_event_trigger(person_recognized_trigger,
@@ -492,9 +515,11 @@ int utc_mediavision_mv_surveillance_unsubscribe_event_trigger_p(void)
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        /* MV_SURVEILLANCE_EVENT_PERSON_RECOGNIZED */
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/model.txt")+1, "%s/res/surv/model.txt", pInternalStoragePath);
        error = mv_engine_config_set_string_attribute(engine_cfg,
                        MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH,
-                       "/home/owner/content/res/surv/model.txt");
+                       pszValue);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        error = mv_surveillance_subscribe_event_trigger(person_recognized_trigger,
@@ -550,8 +575,9 @@ int utc_mediavision_mv_surveillance_push_source_p(void)
                        0, NULL, empty_cb, NULL);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
-       error = load_image_to_media_source(
-                       "/home/owner/content/res/surv/move_det_1.jpg", source_det1);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/move_det_1.jpg")+1, "%s/res/surv/move_det_1.jpg", pInternalStoragePath);
+       error = load_image_to_media_source(pszValue, source_det1);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        error = mv_surveillance_push_source(source_det1, 0);
@@ -566,8 +592,10 @@ int utc_mediavision_mv_surveillance_push_source_p(void)
                        NULL, empty_cb, NULL);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
+       memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/move_det_2.jpg")+1, "%s/res/surv/move_det_2.jpg", pInternalStoragePath);
        error = load_image_to_media_source(
-                       "/home/owner/content/res/surv/move_det_2.jpg", source_det2);
+                       pszValue, source_det2);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        error = mv_surveillance_push_source(source_det2, 0);
@@ -578,17 +606,20 @@ int utc_mediavision_mv_surveillance_push_source_p(void)
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        /* MV_SURVEILLANCE_EVENT_PERSON_RECOGNIZED */
+       memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/model.txt")+1, "%s/res/surv/model.txt", pInternalStoragePath);
        error = mv_engine_config_set_string_attribute(engine_cfg,
                        MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH,
-                       "/home/owner/content/res/surv/model.txt");
+                       pszValue);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        error = mv_surveillance_subscribe_event_trigger(person_recognized_trigger,
                        0, engine_cfg, empty_cb, NULL);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
-       error = load_image_to_media_source(
-                       "/home/owner/content/res/surv/pers_recogn.jpg", source_recog);
+       memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/pers_recogn.jpg")+1, "%s/res/surv/pers_recogn.jpg", pInternalStoragePath);
+       error = load_image_to_media_source(pszValue, source_recog);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        error = mv_surveillance_push_source(source_recog, 0);
@@ -620,8 +651,10 @@ int utc_mediavision_mv_surveillance_push_source_n(void)
        int error = mv_surveillance_push_source(NULL, 0);
        assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, error);
 
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/facedetect/face1.jpg")+1, "%s/res/facedetect/face1.jpg", pInternalStoragePath);
        error = load_image_to_media_source(
-                       "/home/owner/content/res/facedetect/face1.jpg", source_face);
+                       pszValue, source_face);
        assert_eq(MEDIA_VISION_ERROR_NONE, error);
 
        error = mv_surveillance_push_source(source_face, 5);
@@ -1355,8 +1388,9 @@ void utc_capi_media_vision_surveillance_cb1_startup(void)
                return;
        }
 
-       gStartupError = load_image_to_media_source(
-                       "/home/owner/content/res/surv/move_det_1.jpg", source_det1);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/move_det_1.jpg")+1, "%s/res/surv/move_det_1.jpg", pInternalStoragePath);
+       gStartupError = load_image_to_media_source(pszValue, source_det1);
        if (gStartupError != MEDIA_VISION_ERROR_NONE) {
                return;
        }
@@ -1366,8 +1400,9 @@ void utc_capi_media_vision_surveillance_cb1_startup(void)
                return;
        }
 
-       gStartupError = load_image_to_media_source(
-                       "/home/owner/content/res/surv/move_det_2.jpg", source_det2);
+       memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/move_det_2.jpg")+1, "%s/res/surv/move_det_2.jpg", pInternalStoragePath);
+       gStartupError = load_image_to_media_source(pszValue, source_det2);
        if (gStartupError != MEDIA_VISION_ERROR_NONE) {
                return;
        }
@@ -1477,8 +1512,9 @@ void utc_capi_media_vision_surveillance_cb2_startup(void)
                return;
        }
 
-       gStartupError = load_image_to_media_source(
-                       "/home/owner/content/res/surv/move_det_1.jpg", source_det1);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/move_det_1.jpg")+1, "%s/res/surv/move_det_1.jpg", pInternalStoragePath);
+       gStartupError = load_image_to_media_source(pszValue, source_det1);
        if (gStartupError != MEDIA_VISION_ERROR_NONE) {
                return;
        }
@@ -1488,8 +1524,9 @@ void utc_capi_media_vision_surveillance_cb2_startup(void)
                return;
        }
 
-       gStartupError = load_image_to_media_source(
-                       "/home/owner/content/res/surv/pers_recogn.jpg", source_recog);
+       memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/pers_recogn.jpg")+1, "%s/res/surv/pers_recogn.jpg", pInternalStoragePath);
+       gStartupError = load_image_to_media_source(pszValue, source_recog);
        if (gStartupError != MEDIA_VISION_ERROR_NONE) {
                return;
        }
@@ -1601,9 +1638,11 @@ void utc_capi_media_vision_surveillance_cb3_startup(void)
 {
        utc_capi_media_vision_surveillance_startup();
 
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/model.txt")+1, "%s/res/surv/model.txt", pInternalStoragePath);
        gStartupError = mv_engine_config_set_string_attribute(engine_cfg,
                        MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH,
-                       "/home/owner/content/res/surv/model.txt");
+                       pszValue);
        if (gStartupError != MEDIA_VISION_ERROR_NONE) {
                return;
        }
@@ -1615,8 +1654,9 @@ void utc_capi_media_vision_surveillance_cb3_startup(void)
                return;
        }
 
-       gStartupError = load_image_to_media_source(
-                       "/home/owner/content/res/surv/pers_recogn.jpg", source_recog);
+       memset(pszValue, 0, CONFIG_VALUE_LEN_MAX);
+       snprintf(pszValue, strlen(pInternalStoragePath)+strlen("/res/surv/pers_recogn.jpg")+1, "%s/res/surv/pers_recogn.jpg", pInternalStoragePath);
+       gStartupError = load_image_to_media_source(pszValue, source_recog);
        if (gStartupError != MEDIA_VISION_ERROR_NONE) {
                return;
        }
old mode 100755 (executable)
new mode 100644 (file)
index 78cb175..2b63add
@@ -104,7 +104,7 @@ INCLUDE_DIRECTORIES(
     ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
     pthread
old mode 100755 (executable)
new mode 100644 (file)
index 62e807a..e87115b
 #include <account.h>
 #include <storage.h>
 #include <system_info.h>
+#include "tct_common.h"
 
 #include "utc-contacts-service-tc-utils.h"
 
 #define CTS_TC_PATH_LEN 1024
+#define API_NAMESPACE                  "[CONTACTS-SERVICE]"
+
 struct cts_storage_s {
        const char *file_name;
        char *file_path;
 };
 
-static bool _ctsvc_tc_util_storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
-{
-
-       struct cts_storage_s *storage = user_data;
-       char file_path[CTS_TC_PATH_LEN] = {0};
-       if (STORAGE_TYPE_INTERNAL == type) {
-               snprintf(file_path, sizeof(file_path), "%s/res/%s", path, storage->file_name);
-               storage->file_path = strdup(file_path);
-               return false;
-       }
-       return true;
-}
 
 char* ctsvc_tc_util_get_file_path(const char *file)
 {
        struct cts_storage_s storage;
        storage.file_name = file;
-       int ret = storage_foreach_device_supported(_ctsvc_tc_util_storage_device_supported_cb, &storage);
-       if (STORAGE_ERROR_NONE == ret)
-               return storage.file_path;
-       return NULL;
+       storage.file_path = NULL;
+
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+
+               char file_path[CTS_TC_PATH_LEN] = {0};
+               snprintf(file_path, sizeof(file_path), "%s/res/%s", pszValue, storage.file_name);
+               storage.file_path = strdup(file_path);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
+       return storage.file_path;
 }
 
 void ctsvc_tc_util_db_changed_cb(const char *view_uri, void *user_data) { }
old mode 100755 (executable)
new mode 100644 (file)
index 9a40c30..c77e951
@@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES(
        ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
        ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index 3e5f66b..0637756
@@ -18,6 +18,9 @@
 #include <image_util.h>
 #include <storage.h>
 #include <glib.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[IMAGE-UTIL]"
 
 #define WRONG_PATH ""
 
@@ -201,41 +204,6 @@ static bool utc_encode_completed_cb(int error, void *user_param, unsigned long l
                return false;
 }
 
-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) {
-               jpeg_path1 = (char *)malloc(strlen(path) + strlen(jpeg_file1) + 6);
-               memset(jpeg_path1, 0x00, strlen(path) + strlen(jpeg_file1) + 6);
-               snprintf(jpeg_path1, strlen(path) + strlen(jpeg_file1) + 6, "%s/res/%s", path, jpeg_file1);
-               jpeg_path2 = (char *)malloc(strlen(path) + strlen(jpeg_file2) + 6);
-               memset(jpeg_path2, 0x00, strlen(path) + strlen(jpeg_file2) + 6);
-               snprintf(jpeg_path2, strlen(path) + strlen(jpeg_file2) + 6, "%s/res/%s", path, jpeg_file2);
-
-               png_path1 = (char *)malloc(strlen(path) + strlen(png_file1) + 6);
-               memset(png_path1, 0x00, strlen(path) + strlen(png_file1) + 6);
-               snprintf(png_path1, strlen(path) + strlen(png_file1) + 6, "%s/res/%s", path, png_file1);
-               png_path2 = (char *)malloc(strlen(path) + strlen(png_file2) + 6);
-               memset(png_path2, 0x00, strlen(path) + strlen(png_file2) + 6);
-               snprintf(png_path2, strlen(path) + strlen(png_file2) + 6, "%s/res/%s", path, png_file2);
-
-               gif_path1 = (char *)malloc(strlen(path) + strlen(gif_file1) + 6);
-               memset(gif_path1, 0x00, strlen(path) + strlen(gif_file1) + 6);
-               snprintf(gif_path1, strlen(path) + strlen(gif_file1) + 6, "%s/res/%s", path, gif_file1);
-               gif_path2 = (char *)malloc(strlen(path) + strlen(gif_file2) + 6);
-               memset(gif_path2, 0x00, strlen(path) + strlen(gif_file2) + 6);
-               snprintf(gif_path2, strlen(path) + strlen(gif_file2) + 6, "%s/res/%s", path, gif_file2);
-
-               bmp_path1 = (char *)malloc(strlen(path) + strlen(bmp_file1) + 6);
-               memset(bmp_path1, 0x00, strlen(path) + strlen(bmp_file1) + 6);
-               snprintf(bmp_path1, strlen(path) + strlen(bmp_file1) + 6, "%s/res/%s", path, bmp_file1);
-               bmp_path2 = (char *)malloc(strlen(path) + strlen(bmp_file2) + 6);
-               memset(bmp_path2, 0x00, strlen(path) + strlen(bmp_file2) + 6);
-               snprintf(bmp_path2, strlen(path) + strlen(bmp_file2) + 6, "%s/res/%s", path, bmp_file2);
-               return false;
-       }
-       return true;
-}
-
 static void fill_jpeg_decoded_encoded_buffer(void)
 {
        int ret = IMAGE_UTIL_ERROR_NONE;
@@ -353,8 +321,42 @@ void utc_image_util_decode_startup(void)
 {
        int ret = IMAGE_UTIL_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__);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               jpeg_path1 = (char *)malloc(strlen(pszValue) + strlen(jpeg_file1) + 6);
+               memset(jpeg_path1, 0x00, strlen(pszValue) + strlen(jpeg_file1) + 6);
+               snprintf(jpeg_path1, strlen(pszValue) + strlen(jpeg_file1) + 6, "%s/res/%s", pszValue, jpeg_file1);
+               jpeg_path2 = (char *)malloc(strlen(pszValue) + strlen(jpeg_file2) + 6);
+               memset(jpeg_path2, 0x00, strlen(pszValue) + strlen(jpeg_file2) + 6);
+               snprintf(jpeg_path2, strlen(pszValue) + strlen(jpeg_file2) + 6, "%s/res/%s", pszValue, jpeg_file2);
+
+               png_path1 = (char *)malloc(strlen(pszValue) + strlen(png_file1) + 6);
+               memset(png_path1, 0x00, strlen(pszValue) + strlen(png_file1) + 6);
+               snprintf(png_path1, strlen(pszValue) + strlen(png_file1) + 6, "%s/res/%s", pszValue, png_file1);
+               png_path2 = (char *)malloc(strlen(pszValue) + strlen(png_file2) + 6);
+               memset(png_path2, 0x00, strlen(pszValue) + strlen(png_file2) + 6);
+               snprintf(png_path2, strlen(pszValue) + strlen(png_file2) + 6, "%s/res/%s", pszValue, png_file2);
+
+               gif_path1 = (char *)malloc(strlen(pszValue) + strlen(gif_file1) + 6);
+               memset(gif_path1, 0x00, strlen(pszValue) + strlen(gif_file1) + 6);
+               snprintf(gif_path1, strlen(pszValue) + strlen(gif_file1) + 6, "%s/res/%s", pszValue, gif_file1);
+               gif_path2 = (char *)malloc(strlen(pszValue) + strlen(gif_file2) + 6);
+               memset(gif_path2, 0x00, strlen(pszValue) + strlen(gif_file2) + 6);
+               snprintf(gif_path2, strlen(pszValue) + strlen(gif_file2) + 6, "%s/res/%s", pszValue, gif_file2);
+
+               bmp_path1 = (char *)malloc(strlen(pszValue) + strlen(bmp_file1) + 6);
+               memset(bmp_path1, 0x00, strlen(pszValue) + strlen(bmp_file1) + 6);
+               snprintf(bmp_path1, strlen(pszValue) + strlen(bmp_file1) + 6, "%s/res/%s", pszValue, bmp_file1);
+               bmp_path2 = (char *)malloc(strlen(pszValue) + strlen(bmp_file2) + 6);
+               memset(bmp_path2, 0x00, strlen(pszValue) + strlen(bmp_file2) + 6);
+               snprintf(bmp_path2, strlen(pszValue) + strlen(bmp_file2) + 6, "%s/res/%s", pszValue, bmp_file2);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
 
        ret = image_util_decode_create(&jpeg_decode_h);
        assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
@@ -1559,8 +1561,42 @@ void utc_image_util_encode_startup(void)
 {
        int ret = IMAGE_UTIL_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__);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               jpeg_path1 = (char *)malloc(strlen(pszValue) + strlen(jpeg_file1) + 6);
+               memset(jpeg_path1, 0x00, strlen(pszValue) + strlen(jpeg_file1) + 6);
+               snprintf(jpeg_path1, strlen(pszValue) + strlen(jpeg_file1) + 6, "%s/res/%s", pszValue, jpeg_file1);
+               jpeg_path2 = (char *)malloc(strlen(pszValue) + strlen(jpeg_file2) + 6);
+               memset(jpeg_path2, 0x00, strlen(pszValue) + strlen(jpeg_file2) + 6);
+               snprintf(jpeg_path2, strlen(pszValue) + strlen(jpeg_file2) + 6, "%s/res/%s", pszValue, jpeg_file2);
+
+               png_path1 = (char *)malloc(strlen(pszValue) + strlen(png_file1) + 6);
+               memset(png_path1, 0x00, strlen(pszValue) + strlen(png_file1) + 6);
+               snprintf(png_path1, strlen(pszValue) + strlen(png_file1) + 6, "%s/res/%s", pszValue, png_file1);
+               png_path2 = (char *)malloc(strlen(pszValue) + strlen(png_file2) + 6);
+               memset(png_path2, 0x00, strlen(pszValue) + strlen(png_file2) + 6);
+               snprintf(png_path2, strlen(pszValue) + strlen(png_file2) + 6, "%s/res/%s", pszValue, png_file2);
+
+               gif_path1 = (char *)malloc(strlen(pszValue) + strlen(gif_file1) + 6);
+               memset(gif_path1, 0x00, strlen(pszValue) + strlen(gif_file1) + 6);
+               snprintf(gif_path1, strlen(pszValue) + strlen(gif_file1) + 6, "%s/res/%s", pszValue, gif_file1);
+               gif_path2 = (char *)malloc(strlen(pszValue) + strlen(gif_file2) + 6);
+               memset(gif_path2, 0x00, strlen(pszValue) + strlen(gif_file2) + 6);
+               snprintf(gif_path2, strlen(pszValue) + strlen(gif_file2) + 6, "%s/res/%s", pszValue, gif_file2);
+
+               bmp_path1 = (char *)malloc(strlen(pszValue) + strlen(bmp_file1) + 6);
+               memset(bmp_path1, 0x00, strlen(pszValue) + strlen(bmp_file1) + 6);
+               snprintf(bmp_path1, strlen(pszValue) + strlen(bmp_file1) + 6, "%s/res/%s", pszValue, bmp_file1);
+               bmp_path2 = (char *)malloc(strlen(pszValue) + strlen(bmp_file2) + 6);
+               memset(bmp_path2, 0x00, strlen(pszValue) + strlen(bmp_file2) + 6);
+               snprintf(bmp_path2, strlen(pszValue) + strlen(bmp_file2) + 6, "%s/res/%s", pszValue, bmp_file2);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
 
        ret = image_util_encode_create(IMAGE_UTIL_JPEG, &jpeg_encode_h);
        assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
index 7236b9a..ef88218 100644 (file)
@@ -17,7 +17,8 @@
 #include <stdio.h>
 #include <image_util.h>
 #include <storage.h>
-
+#include "tct_common.h"
+#define API_NAMESPACE                  "[IMAGE-UTIL]"
 #define WRONG_PATH ""
 
 static image_util_colorspace_e SUPPORTED_COLORSPACE;
@@ -47,21 +48,6 @@ static struct{
 }jpeg_image = {NULL, 0};
 
 
-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_path1 = (char*)malloc(strlen(path) + strlen(img_file1) + 6);
-        snprintf(img_path1, strlen(path) + strlen(img_file1) + 6, "%s/res/%s", path, img_file1);
-        img_path2 = (char*)malloc(strlen(path) + strlen(img_file2) + 6);
-               memset(img_path2,0x00,strlen(path) + strlen(img_file2) + 6);
-        snprintf(img_path2, strlen(path) + strlen(img_file1) + 6, "%s/res/%s", path, img_file2);
-        return false;
-    }
-    return true;
-}
-
-
 static bool find_first_supported_colorspace_cb( image_util_colorspace_e colorspace, void * user_data)
 {
        SUPPORTED_COLORSPACE = colorspace;
@@ -78,9 +64,19 @@ void utc_image_util_jpeg_startup(void)
 {
        int ret = IMAGE_UTIL_ERROR_NONE;
 
-       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               img_path1 = (char*)malloc(strlen(pszValue) + strlen(img_file1) + 6);
+               snprintf(img_path1, strlen(pszValue) + strlen(img_file1) + 6, "%s/res/%s", pszValue, img_file1);
+               img_path2 = (char*)malloc(strlen(pszValue) + strlen(img_file2) + 6);
+               memset(img_path2,0x00,strlen(pszValue) + strlen(img_file2) + 6);
+               snprintf(img_path2, strlen(pszValue) + strlen(img_file1) + 6, "%s/res/%s", pszValue, img_file2);
+       }
+       else
        {
-               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
        }
 
        ret = image_util_foreach_supported_jpeg_colorspace(find_first_supported_colorspace_cb , NULL);
old mode 100755 (executable)
new mode 100644 (file)
index 19aa82e..6fda027
@@ -18,6 +18,9 @@
 #include <glib.h>
 #include <image_util.h>
 #include <storage.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[IMAGE-UTIL]"
 
 
 #define LAST_COLORSPACE IMAGE_UTIL_COLORSPACE_BGRX8888
@@ -51,16 +54,6 @@ static void wait_for_async()
        g_image_util_mainloop = NULL;
 }
 
-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_path1 = (char*)malloc(strlen(path) + strlen(img_file1) + 6);
-        snprintf(img_path1, strlen(path) + strlen(img_file1) + 6, "%s/res/%s", path, img_file1);
-        return false;
-    }
-    return true;
-}
 
 static bool find_first_supported_colorspace_cb( image_util_colorspace_e colorspace, void * user_data)
 {
@@ -77,9 +70,16 @@ static bool find_first_supported_colorspace_cb( image_util_colorspace_e colorspa
  */
 void utc_media_image_util_basic_startup(void)
 {
-       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               img_path1 = (char*)malloc(strlen(pszValue) + strlen(img_file1) + 6);
+               snprintf(img_path1, strlen(pszValue) + strlen(img_file1) + 6, "%s/res/%s", pszValue, img_file1);
+       }
+       else
        {
-               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
        }
        image_util_foreach_supported_jpeg_colorspace(find_first_supported_colorspace_cb, NULL);
 }
old mode 100755 (executable)
new mode 100644 (file)
index 2623a21..44a991c
@@ -34,6 +34,6 @@ PKG_CHECK_MODULES(pkgs REQUIRED
 INCLUDE_DIRECTORIES(${pkgs_INCLUDE_DIRS})
 LINK_DIRECTORIES(${pkgs_LIBRARY_DIRS})
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME} ${pkgs_LIBRARIES})
 INSTALL(PROGRAMS ${EXEC_NAME} DESTINATION ${BIN_DIR}/${RPM_NAME}/bin)
old mode 100755 (executable)
new mode 100644 (file)
index fee246c..10ff7c5
@@ -19,6 +19,9 @@
 #include <iotcon.h>
 
 #include "utc-iotcon-common.h"
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[IOTCON]"
 
 static bool g_feature_security;
 
@@ -53,6 +56,7 @@ void utc_iotcon_security_cleanup(void)
 {
 }
 
+static const char *icutc_svr_db_file = "oic_svr_db.dat";
 
 /**
  * @testcase      utc_iotcon_secure_initialize_p
@@ -70,8 +74,20 @@ int utc_iotcon_secure_initialize_p(void)
                return 0;
        }
 
-       ret = storage_foreach_device_supported(icutc_storage_device_supported_cb, &path);
-       ICUTC_ASSERT_EQ(ret, STORAGE_ERROR_NONE);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+
+               char file_path[PATH_MAX] = {0};
+               snprintf(file_path, sizeof(file_path), "%s/res/%s", pszValue, icutc_svr_db_file);
+               path = strdup(file_path);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+               return -1;
+       }
 
        ICUTC_INFO("path : %s", path);
 
old mode 100755 (executable)
new mode 100644 (file)
index 3053b95..31c1bcb
@@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
        ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
        ${${CAPI_LIB}_LIBRARIES}
   pthread
old mode 100755 (executable)
new mode 100644 (file)
index 8da17ab..1590545
@@ -19,7 +19,9 @@
 #include <string.h>
 #include <storage.h>
 #include <pthread.h>
-#include <unistd.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[MEDIACODEC]"
 
 #define MAX_HANDLE                     10
 #define MAX_INPUT_BUF_NUM   5
@@ -522,31 +524,6 @@ static void feed_thread_func()
        pthread_exit(0);
 }
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-       if (type == STORAGE_TYPE_INTERNAL) {
-               int size_of_path = 0;
-
-               size_of_path = strlen(path) + strlen(vdec_file) + 6;
-               vdec_path = (char*)malloc(size_of_path);
-               snprintf(vdec_path, size_of_path, "%s/res/%s", path, vdec_file);
-
-               size_of_path = strlen(path) + strlen(venc_file) + 6;
-               venc_path = (char*)malloc(size_of_path);
-               snprintf(venc_path, size_of_path, "%s/res/%s", path, venc_file);
-
-               size_of_path = strlen(path) + strlen(aenc_file) + 6;
-               aenc_path = (char*)malloc(size_of_path);
-               snprintf(aenc_path, size_of_path, "%s/res/%s", path, aenc_file);
-
-               size_of_path = strlen(path) + strlen(adec_file) + 6;
-               adec_path = (char*)malloc(size_of_path);
-               snprintf(adec_path, size_of_path, "%s/res/%s", path, adec_file);
-
-               return false;
-       }
-       return true;
-}
 
 int _mediacodec_get_output(void)
 {
@@ -614,7 +591,7 @@ static bool eos_cb(void *user_data)
 static bool _mcdiacodec_supported_cb(mediacodec_codec_type_e type, void *user_data)
 {
        if(type != -1)
-               g_print("type : %x\n", type);
+               g_printf("type : %x\n", type);
        return true;
 }
 
@@ -635,8 +612,31 @@ void utc_media_mediacodec_startup(void)
        int ret = 0;
        int i;
 
-       if(storage_foreach_device_supported(storage_device_cb, NULL) != STORAGE_ERROR_NONE) {
-               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               
+               int size_of_path = 0;
+               size_of_path = strlen(pszValue) + strlen(vdec_file) + 6;
+               vdec_path = (char*)malloc(size_of_path);
+               snprintf(vdec_path, size_of_path, "%s/res/%s", pszValue, vdec_file);
+
+               size_of_path = strlen(pszValue) + strlen(venc_file) + 6;
+               venc_path = (char*)malloc(size_of_path);
+               snprintf(venc_path, size_of_path, "%s/res/%s", pszValue, venc_file);
+
+               size_of_path = strlen(pszValue) + strlen(aenc_file) + 6;
+               aenc_path = (char*)malloc(size_of_path);
+               snprintf(aenc_path, size_of_path, "%s/res/%s", pszValue, aenc_file);
+
+               size_of_path = strlen(pszValue) + strlen(adec_file) + 6;
+               adec_path = (char*)malloc(size_of_path);
+               snprintf(adec_path, size_of_path, "%s/res/%s", pszValue, adec_file);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
        }
 
        if ( (fp_vdec = fopen(vdec_path, "r")) == -1 ) {
old mode 100755 (executable)
new mode 100644 (file)
index cbd99bf..f93f59f
@@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
        ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
        ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index 9628310..79a3f9f
@@ -8,6 +8,9 @@
 #include <storage.h>
 #include <dlog.h>
 // #include <media_packet_internal.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[MEDIAMUXER]"
 
 //& set: Mediamuxer
 
@@ -41,26 +44,6 @@ void eos_cb(int track_index, void *user_data)
        return;
 }
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data){
-    if(type == STORAGE_TYPE_INTERNAL) {
-        if(user_data != NULL) {
-            file_path = (char*)malloc(strlen(path) + strlen(user_data) + 6);
-            snprintf(file_path, strlen(path) + strlen(user_data) + 6, "%s/res/%s", path, user_data );
-        } else {
-            file = file_name;
-            file_path = (char*)malloc(strlen(path) + strlen(file) + 6);
-                       snprintf(file_path, strlen(path) + strlen(file) + 6,"%s/res/%s", path, user_data );
-        }
-
-        LOGI("file_path=%s\n",file_path);
-
-        return false;
-    } else {
-               LOGI("STORAGE_TYPE_INTERNAL is FALASE\n");
-       }
-    return true;
-}
-
 /**
  * @function           utc_mediademuxer_startup
  * @description                Called before each test
@@ -73,10 +56,19 @@ void utc_mediademuxer_startup(void)
        LOGI("%s ENTER\n",__func__);
        mediademuxer_state state;
        if(uri == NULL){
-               if(storage_foreach_device_supported(storage_device_cb, "sample.mp4") != STORAGE_ERROR_NONE)
+               char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+               if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
                {
-                       fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+                       PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+                       file_path = (char*)malloc(strlen(pszValue) + strlen("sample.mp4") + 6);
+                       snprintf(file_path, strlen(pszValue) + strlen("sample.mp4") + 6, "%s/res/%s", pszValue, "sample.mp4" );
                }
+               else
+               {
+                       PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+               }
+               LOGI("file_path=%s\n",file_path);
+
                uri = file_path;
                LOGI("uri is set to %s\n",uri);
        }
old mode 100755 (executable)
new mode 100644 (file)
index e1026bc..9c5a2dc
@@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
        ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
        ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index baf5ab6..225e9f4
@@ -19,6 +19,7 @@
 #include <storage.h>
 #include <dlog.h>
 #include <glib.h>
+#include "tct_common.h"
 
 //#include <media_packet.h>
 //#include <media_format.h>
@@ -30,7 +31,8 @@
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "UTC_MUX"
+#define LOG_TAG                        "UTC_MUX"
+#define API_NAMESPACE                  "[MEDIAMUXER]"
 
 
 //& set: Mediamuxer
@@ -54,27 +56,6 @@ static bool app_err_cb(mediamuxer_error_e error, void *user_data)
        return true;
 }
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
-
-    if(type == STORAGE_TYPE_INTERNAL) {
-        if(h264_path == NULL) {
-            h264_path = (char*)malloc(strlen(path) + strlen(h264_file) + 6);
-            snprintf(h264_path, strlen(path) + strlen(h264_file) + 6, "%s/res/%s", path, h264_file );
-        }
-        if(h264_data_path == NULL) {
-            h264_data_path = (char*)malloc(strlen(path) + strlen(h264_data_file) + 6);
-            snprintf(h264_data_path, strlen(path) + strlen(h264_data_file) + 6, "%s/res/%s", path, h264_data_file );
-        }
-        if(file_path == NULL){
-            file_path = (char*)malloc(strlen(path)+ strlen(file) + 6);
-            snprintf(file_path, strlen(path)+ strlen(file) + 6, "%s/res/%s", path, file );
-        }
-        return false;
-    }
-
-    return true;
-}
-
 
 /**
  * @function           utc_mediamuxer_startup
@@ -88,11 +69,28 @@ void utc_mediamuxer_startup(void)
        LOGI("%s ENTER ________________________________\n",__func__);
        mediamuxer_output_format_e  format = MEDIAMUXER_CONTAINER_FORMAT_MP4;
 
-
-        if(storage_foreach_device_supported(storage_device_cb, NULL) != STORAGE_ERROR_NONE)
-        {
-                fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
-        }
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               
+               if(h264_path == NULL) {
+               h264_path = (char*)malloc(strlen(pszValue) + strlen(h264_file) + 6);
+                   snprintf(h264_path, strlen(pszValue) + strlen(h264_file) + 6, "%s/res/%s", pszValue, h264_file );
+               }
+               if(h264_data_path == NULL) {
+                   h264_data_path = (char*)malloc(strlen(pszValue) + strlen(h264_data_file) + 6);
+                   snprintf(h264_data_path, strlen(pszValue) + strlen(h264_data_file) + 6, "%s/res/%s", pszValue, h264_data_file );
+               }
+               if(file_path == NULL){
+                   file_path = (char*)malloc(strlen(pszValue)+ strlen(file) + 6);
+                   snprintf(file_path, strlen(pszValue)+ strlen(file) + 6, "%s/res/%s", pszValue, file );
+               }
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
 
         if(g_media_muxer == NULL) {
                 ret = mediamuxer_create(&g_media_muxer);
@@ -156,6 +154,26 @@ void utc_mediamuxer_cleanup(void)
                ret = mediamuxer_destroy(g_media_muxer);
                g_media_muxer = NULL;
        }
+
+       if(h264_path)
+       {
+               free(h264_path);
+               h264_path = NULL;
+       }
+
+       if(h264_data_path)
+       {
+               free(h264_data_path);
+               h264_data_path = NULL;
+       }
+
+       if(file_path)
+       {
+               free(file_path);
+               file_path = NULL;
+               uri = NULL;
+       }
+
        LOGI("%s EXIT -------------------------------\n",__func__);
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index ab2bd34..36f5ac1
@@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES(
        ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
        ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index a21b5d2..6b97e1d
 #include <string.h>
 #include <storage.h>
 #include <system_info.h>
+#include "tct_common.h"
 
 //& set: Messages
-#define CONFIG_LINE_LEN_MAX            2048    //maximum key-value line length
-#define CONFIG_VALUE_LEN_MAX           1024    //maximum length of value
+//#define CONFIG_LINE_LEN_MAX          2048    //maximum key-value line length
+//#define CONFIG_VALUE_LEN_MAX         1024    //maximum length of value
 
 #define TEST_ADDRESS_COUNT 3
 #define TEST_ADDRESS "+8230014180"
 
+#define API_NAMESPACE  "MESSAGES"
+
 static char g_pstrRecipient[CONFIG_VALUE_LEN_MAX] = {0,};
 
 static char *test_addresses[TEST_ADDRESS_COUNT] = {
@@ -60,25 +63,6 @@ static int searched_message_length;
 static bool is_sms_supported;
 static bool is_mms_supported;
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
-                       if (type == STORAGE_TYPE_INTERNAL) {
-                               int image_path_size = strlen(path)+strlen(image)+sizeof(char)*6;
-                               image_path=(char*)calloc(image_path_size, sizeof(char));
-                               snprintf(image_path, image_path_size, "%s/res/%s", path, image);
-
-                               int audio_path_size = strlen(path)+strlen(audio)+sizeof(char)*6;
-                               audio_path=(char*)calloc(audio_path_size, sizeof(char));
-                               snprintf(audio_path, audio_path_size, "%s/res/%s", path, audio);
-
-                               int video_path_size = strlen(path)+strlen(video)+sizeof(char)*6;
-                               video_path=(char*)calloc(video_path_size, sizeof(char));
-                               snprintf(video_path, video_path_size, "%s/res/%s", path, video);
-                               return false;
-                       }
-                       return true;
-}
-
-
 typedef struct
 {
        bool add_address;
@@ -164,7 +148,28 @@ void utc_messaging_messages_startup(void)
        /* start of TC */
        system_info_get_platform_bool("http://tizen.org/feature/network.telephony.sms",&is_sms_supported);
        system_info_get_platform_bool("http://tizen.org/feature/network.telephony.mms",&is_mms_supported);
-       storage_foreach_device_supported(storage_device_cb,NULL);
+       //storage_foreach_device_supported(storage_device_cb,NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               int image_path_size = strlen(pszValue)+strlen(image)+sizeof(char)*6;
+               image_path=(char*)calloc(image_path_size, sizeof(char));
+               snprintf(image_path, image_path_size, "%s/res/%s", pszValue, image);
+
+               int audio_path_size = strlen(pszValue)+strlen(audio)+sizeof(char)*6;
+               audio_path=(char*)calloc(audio_path_size, sizeof(char));
+               snprintf(audio_path, audio_path_size, "%s/res/%s", pszValue, audio);
+
+               int video_path_size = strlen(pszValue)+strlen(video)+sizeof(char)*6;
+               video_path=(char*)calloc(video_path_size, sizeof(char));
+               snprintf(video_path, video_path_size, "%s/res/%s", pszValue, video);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error\\n", __LINE__, API_NAMESPACE);
+       }
+       
        messages_open_service(&_svc);
 
        if ( true != _get_value_from_config("MESSAGES_MOBILE_NUMBER", g_pstrRecipient) )
old mode 100755 (executable)
new mode 100644 (file)
index 6f55aad..6c89fcb
@@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES(
     ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index 5debf38..0e50403
 #include <string.h>
 #include <metadata_editor.h>
 #include <storage.h>
+#include "tct_common.h"
 
-#define MEDIA_AUDIO_PATH               "/home/owner/apps_rw/core-metadata-editor-tests/data/sample_audio.mp3"
-#define MEDIA_NO_TAG_AUDIO_PATH        "/home/owner/apps_rw/core-metadata-editor-tests/data/no_tag.mp3"
-#define MEDIA_TAGV1_AUDIO_PATH         "/home/owner/apps_rw/core-metadata-editor-tests/data/id3tag_v1.mp3"
-#define MEDIA_M4A_AUDIO_PATH           "/home/owner/apps_rw/core-metadata-editor-tests/data/sample_m4a.m4a"
-#define MEDIA_VIDEO_PATH               "/home/owner/apps_rw/core-metadata-editor-tests/data/sample_video.mp4"
-#define MEDIA_IMAGE_PATH               "/home/owner/apps_rw/core-metadata-editor-tests/data/sample.jpg"
-#define MEDIA_NOT_EXIST_PATH           "/home/owner/apps_rw/core-metadata-editor-tests/data/not_exist.mp3"
+const char *g_pszMEDIA_AUDIO_PATH = NULL;
+const char *g_pszMEDIA_NO_TAG_AUDIO_PATH = NULL;
+const char *g_pszMEDIA_TAGV1_AUDIO_PATH = NULL;
+const char *g_pszMEDIA_M4A_AUDIO_PATH = NULL;
+const char *g_pszMEDIA_VIDEO_PATH = NULL;
+const char *g_pszMEDIA_IMAGE_PATH = NULL;
+const char *g_pszMEDIA_NOT_EXIST_PATH = NULL;
 
 #define CHANGE_NAME                            "change"
-
+#define API_NAMESPACE                          "[METADATA-EDITOR]"
 #define SAFE_FREE(src)   { if(src) {free(src); src = NULL;}}
 
 static metadata_editor_h  g_metadata_audio_h = NULL;
@@ -46,6 +47,44 @@ static int _startup_error = 0;
  */
 void utc_metadata_editor_startup(void)
 {
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_USER_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_USER_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               
+               int path_size = strlen(pszValue)+strlen("/apps_rw/core-metadata-editor-tests/data/sample_audio.mp3")+1;
+               g_pszMEDIA_AUDIO_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszMEDIA_AUDIO_PATH, path_size, "%s/apps_rw/core-metadata-editor-tests/data/sample_audio.mp3", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/apps_rw/core-metadata-editor-tests/data/no_tag.mp3")+1;
+               g_pszMEDIA_NO_TAG_AUDIO_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszMEDIA_NO_TAG_AUDIO_PATH, path_size, "%s/apps_rw/core-metadata-editor-tests/data/no_tag.mp3", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/apps_rw/core-metadata-editor-tests/data/id3tag_v1.mp3")+1;
+               g_pszMEDIA_TAGV1_AUDIO_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszMEDIA_TAGV1_AUDIO_PATH, path_size, "%s/apps_rw/core-metadata-editor-tests/data/id3tag_v1.mp3", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/apps_rw/core-metadata-editor-tests/data/sample_m4a.m4a")+1;
+               g_pszMEDIA_M4A_AUDIO_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszMEDIA_M4A_AUDIO_PATH, path_size, "%s/apps_rw/core-metadata-editor-tests/data/sample_m4a.m4a", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/apps_rw/core-metadata-editor-tests/data/sample_video.mp4")+1;
+               g_pszMEDIA_VIDEO_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszMEDIA_VIDEO_PATH, path_size, "%s/apps_rw/core-metadata-editor-tests/data/sample_video.mp4", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/apps_rw/core-metadata-editor-tests/data/sample.jpg")+1;
+               g_pszMEDIA_IMAGE_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszMEDIA_IMAGE_PATH, path_size, "%s/apps_rw/core-metadata-editor-tests/data/sample.jpg", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/apps_rw/core-metadata-editor-tests/data/not_exist.mp3")+1;
+               g_pszMEDIA_NOT_EXIST_PATH=(char*)calloc(path_size, sizeof(char));
+               snprintf(g_pszMEDIA_NOT_EXIST_PATH, path_size, "%s/apps_rw/core-metadata-editor-tests/data/not_exist.mp3", pszValue);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_USER_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        if (METADATA_EDITOR_ERROR_NONE != metadata_editor_create(&g_metadata_audio_h)) {
                _startup_error = 1;
        }
@@ -64,14 +103,49 @@ void utc_metadata_editor_cleanup(void)
 {
        if (g_metadata_audio_h) {
                if (METADATA_EDITOR_ERROR_NONE != metadata_editor_destroy(g_metadata_audio_h)) {
-                       fprintf(stderr, "Cleanup function error - can affect other tests.");
+                       PRINT_UTC_LOG(stderr, "Cleanup function error - can affect other tests.");
                }
        }
        if (g_metadata_video_h) {
                if (METADATA_EDITOR_ERROR_NONE != metadata_editor_destroy(g_metadata_video_h)) {
-                       fprintf(stderr, "Cleanup function error - can affect other tests.");
+                       PRINT_UTC_LOG(stderr, "Cleanup function error - can affect other tests.");
                }
        }
+
+       if (g_pszMEDIA_AUDIO_PATH) {
+               free(g_pszMEDIA_AUDIO_PATH);
+               g_pszMEDIA_AUDIO_PATH = NULL;
+       }
+
+       if (g_pszMEDIA_NO_TAG_AUDIO_PATH) {
+               free(g_pszMEDIA_NO_TAG_AUDIO_PATH);
+               g_pszMEDIA_NO_TAG_AUDIO_PATH = NULL;
+       }
+
+       if (g_pszMEDIA_TAGV1_AUDIO_PATH) {
+               free(g_pszMEDIA_TAGV1_AUDIO_PATH);
+               g_pszMEDIA_TAGV1_AUDIO_PATH = NULL;
+       }
+
+       if (g_pszMEDIA_M4A_AUDIO_PATH) {
+               free(g_pszMEDIA_M4A_AUDIO_PATH);
+               g_pszMEDIA_M4A_AUDIO_PATH = NULL;
+       }
+
+       if (g_pszMEDIA_VIDEO_PATH) {
+               free(g_pszMEDIA_VIDEO_PATH);
+               g_pszMEDIA_VIDEO_PATH = NULL;
+       }
+
+       if (g_pszMEDIA_IMAGE_PATH) {
+               free(g_pszMEDIA_IMAGE_PATH);
+               g_pszMEDIA_IMAGE_PATH = NULL;
+       }
+
+       if (g_pszMEDIA_NOT_EXIST_PATH) {
+               free(g_pszMEDIA_NOT_EXIST_PATH);
+               g_pszMEDIA_NOT_EXIST_PATH = NULL;
+       }
 }
 
 /**
@@ -114,7 +188,7 @@ int utc_metadata_editor_set_path_n(void)
 {
        assert_eq(_startup_error, 0);
 
-       int ret = metadata_editor_set_path(NULL, MEDIA_AUDIO_PATH);
+       int ret = metadata_editor_set_path(NULL, g_pszMEDIA_AUDIO_PATH);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_INVALID_PARAMETER);
 
@@ -122,7 +196,7 @@ int utc_metadata_editor_set_path_n(void)
 
        assert_eq(ret, METADATA_EDITOR_ERROR_INVALID_PARAMETER);
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_NOT_EXIST_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_NOT_EXIST_PATH);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_FILE_EXISTS);
 
@@ -138,8 +212,8 @@ int utc_metadata_editor_set_path_p(void)
 {
        assert_eq(_startup_error, 0);
 
-       int ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_VIDEO_PATH);
+       int ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_VIDEO_PATH);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
@@ -179,7 +253,7 @@ int utc_metadata_editor_get_metadata_p(void)
        int ret = METADATA_EDITOR_ERROR_NONE;
        char *c_value = NULL;
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
 
        ret = metadata_editor_get_metadata(g_metadata_audio_h, METADATA_EDITOR_ATTR_ARTIST, &c_value);
        if(c_value)
@@ -262,7 +336,7 @@ int utc_metadata_editor_get_metadata_p(void)
        metadata_editor_destroy(g_metadata_audio_h);
        metadata_editor_create(&g_metadata_audio_h);
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_NO_TAG_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_NO_TAG_AUDIO_PATH);
 
        ret = metadata_editor_get_metadata(g_metadata_audio_h, METADATA_EDITOR_ATTR_ARTIST, &c_value);
        if(c_value)
@@ -309,7 +383,7 @@ int utc_metadata_editor_get_metadata_p(void)
        metadata_editor_destroy(g_metadata_audio_h);
        metadata_editor_create(&g_metadata_audio_h);
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_TAGV1_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_TAGV1_AUDIO_PATH);
 
        ret = metadata_editor_get_metadata(g_metadata_audio_h, METADATA_EDITOR_ATTR_ARTIST, &c_value);
        if(c_value)
@@ -353,7 +427,7 @@ int utc_metadata_editor_get_metadata_p(void)
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_VIDEO_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_VIDEO_PATH);
 
        ret = metadata_editor_get_metadata(g_metadata_video_h, METADATA_EDITOR_ATTR_ARTIST, &c_value);
        if(c_value)
@@ -462,7 +536,7 @@ int utc_metadata_editor_set_metadata_p(void)
        assert_eq(_startup_error, 0);
 
        char *value = NULL;
-       int ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       int ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
        ret = metadata_editor_set_metadata(g_metadata_audio_h, METADATA_EDITOR_ATTR_ARTIST, "test");
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
@@ -523,7 +597,7 @@ int utc_metadata_editor_set_metadata_p(void)
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
        /* Check value */
@@ -681,7 +755,7 @@ int utc_metadata_editor_set_metadata_p(void)
                value = NULL;
        }
 
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_VIDEO_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_VIDEO_PATH);
        ret = metadata_editor_set_metadata(g_metadata_video_h, METADATA_EDITOR_ATTR_ARTIST, "test");
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
@@ -743,7 +817,7 @@ int utc_metadata_editor_set_metadata_p(void)
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_AUDIO_PATH);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
        /* Check value */
@@ -929,14 +1003,14 @@ int utc_metadata_editor_update_metadata_p(void)
 {
        assert_eq(_startup_error, 0);
 
-       int ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       int ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
        metadata_editor_set_metadata(g_metadata_audio_h, METADATA_EDITOR_ATTR_TITLE, CHANGE_NAME);
 
        ret = metadata_editor_update_metadata(g_metadata_audio_h);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_VIDEO_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_VIDEO_PATH);
        metadata_editor_set_metadata(g_metadata_video_h, METADATA_EDITOR_ATTR_TITLE, CHANGE_NAME);
 
        ret = metadata_editor_update_metadata(g_metadata_video_h);
@@ -968,7 +1042,7 @@ int utc_metadata_editor_get_picture_n(void)
 
        assert_eq(ret, METADATA_EDITOR_ERROR_INVALID_PARAMETER);
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
        ret = metadata_editor_get_picture(g_metadata_audio_h, -1, &picture, &size, &type);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_INVALID_PARAMETER);
@@ -990,7 +1064,7 @@ int utc_metadata_editor_get_picture_p(void)
        void *picture = NULL;
        char *type;
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
        ret = metadata_editor_get_picture(g_metadata_audio_h, 0, &picture, &size, &type);
 
        SAFE_FREE(picture);
@@ -1017,8 +1091,8 @@ int utc_metadata_editor_append_picture_n(void)
 
        assert_eq(ret, METADATA_EDITOR_ERROR_INVALID_PARAMETER);
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
-       ret = metadata_editor_append_picture(g_metadata_audio_h, MEDIA_NOT_EXIST_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
+       ret = metadata_editor_append_picture(g_metadata_audio_h, g_pszMEDIA_NOT_EXIST_PATH);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_PERMISSION_DENIED);
 
@@ -1039,9 +1113,9 @@ int utc_metadata_editor_append_picture_p(void)
        void *picture = NULL;
        char *type;
 
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
-       ret = metadata_editor_append_picture(g_metadata_audio_h, MEDIA_IMAGE_PATH);
+       ret = metadata_editor_append_picture(g_metadata_audio_h, g_pszMEDIA_IMAGE_PATH);
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
        metadata_editor_get_picture(g_metadata_audio_h, 0, &picture, &size, &type);
@@ -1054,9 +1128,9 @@ int utc_metadata_editor_append_picture_p(void)
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_VIDEO_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_VIDEO_PATH);
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
-       ret = metadata_editor_append_picture(g_metadata_video_h, MEDIA_IMAGE_PATH);
+       ret = metadata_editor_append_picture(g_metadata_video_h, g_pszMEDIA_IMAGE_PATH);
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
        metadata_editor_get_picture(g_metadata_video_h, 0, &picture, &size, &type);
@@ -1073,9 +1147,9 @@ int utc_metadata_editor_append_picture_p(void)
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
        ret = metadata_editor_create(&g_metadata_audio_h);
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
-       ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_M4A_AUDIO_PATH);
+       ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_M4A_AUDIO_PATH);
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
-       ret = metadata_editor_append_picture(g_metadata_audio_h, MEDIA_IMAGE_PATH);
+       ret = metadata_editor_append_picture(g_metadata_audio_h, g_pszMEDIA_IMAGE_PATH);
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
        metadata_editor_get_picture(g_metadata_audio_h, 0, &picture, &size, &type);
@@ -1116,14 +1190,14 @@ int utc_metadata_editor_remove_picture_p(void)
 {
        assert_eq(_startup_error, 0);
 
-       int ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
-       ret = metadata_editor_append_picture(g_metadata_audio_h, MEDIA_IMAGE_PATH);
+       int ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
+       ret = metadata_editor_append_picture(g_metadata_audio_h, g_pszMEDIA_IMAGE_PATH);
        ret = metadata_editor_remove_picture(g_metadata_audio_h, 0);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
 
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_VIDEO_PATH);
-       ret = metadata_editor_append_picture(g_metadata_video_h, MEDIA_IMAGE_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_VIDEO_PATH);
+       ret = metadata_editor_append_picture(g_metadata_video_h, g_pszMEDIA_IMAGE_PATH);
        ret = metadata_editor_remove_picture(g_metadata_video_h, 0);
 
        assert_eq(ret, METADATA_EDITOR_ERROR_NONE);
@@ -1155,11 +1229,11 @@ int utc_metadata_editor_destroy_p(void)
 {
        assert_eq(_startup_error, 0);
 
-       int ret = metadata_editor_set_path(g_metadata_audio_h, MEDIA_AUDIO_PATH);
+       int ret = metadata_editor_set_path(g_metadata_audio_h, g_pszMEDIA_AUDIO_PATH);
        ret = metadata_editor_destroy(g_metadata_audio_h);
        g_metadata_audio_h = NULL;
 
-       ret = metadata_editor_set_path(g_metadata_video_h, MEDIA_VIDEO_PATH);
+       ret = metadata_editor_set_path(g_metadata_video_h, g_pszMEDIA_VIDEO_PATH);
        ret = metadata_editor_destroy(g_metadata_video_h);
        g_metadata_video_h = NULL;
 
old mode 100755 (executable)
new mode 100644 (file)
index eec5750..e254c6e
@@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES(
     ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index a10f101..855630d
@@ -19,7 +19,9 @@
 #include <string.h>
 #include <metadata_extractor.h>
 #include <storage.h>
+#include "tct_common.h"
 
+#define API_NAMESPACE                  "[METADATA-EXTRACTOR]"
 
 static char* video="movie.mp4";
 static char* audio="sound.mp3";
@@ -136,7 +138,19 @@ static bool storage_device_cb(int storage_id, storage_type_e type, storage_state
  */
 void utc_metadata_extractor_startup(void)
 {
-       storage_foreach_device_supported(storage_device_cb,NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               video_path=(char*)malloc(strlen(pszValue)+strlen(video)+6);
+               snprintf(video_path, strlen(pszValue)+strlen(video)+6, "%s/res/%s",pszValue,video);
+               audio_path=(char*)malloc(strlen(pszValue)+strlen(audio)+6);
+               snprintf(audio_path, strlen(pszValue)+strlen(audio)+6, "%s/res/%s",pszValue,audio);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
 
        if (METADATA_EXTRACTOR_ERROR_NONE != metadata_extractor_create(&g_metadata_h)) {
                _startup_error = 1;
old mode 100755 (executable)
new mode 100644 (file)
index 386a93c..66e60c2
@@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES(
        ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
        ${${CAPI_LIB}_LIBRARIES}
 )
index 76c2e56..799e153 100644 (file)
@@ -18,6 +18,9 @@
 #include <glib.h>
 #include <storage.h>
 #include <string.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[PLAYER]"
 
 //& set: MediaPlayerCallback
 
@@ -67,24 +70,6 @@ static void wait_for_async()
     g_main_context_unref(context);
 }
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-    unsigned int size_of_path = 0;
-
-    if (type == STORAGE_TYPE_INTERNAL) {
-        size_of_path = strlen(path) + strlen(media) + 6;
-        media_path = (char*)malloc(size_of_path);
-        snprintf(media_path, size_of_path, "%s/res/%s", path, media);
-
-        size_of_path = strlen(path) + strlen(subtitle) + 6;
-        subtitle_path = (char*)malloc(size_of_path);
-        snprintf(subtitle_path, size_of_path, "%s/res/%s", path, subtitle);
-
-        return false;
-    }
-    return true;
-}
-
 /**
  * @function           utc_media_player_callback_startup
  * @description                Called before each test
@@ -93,7 +78,22 @@ static bool storage_device_cb(int storage_id, storage_type_e type, storage_state
  */
 void utc_media_player_callback_startup(void)
 {
-    storage_foreach_device_supported(storage_device_cb, NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               unsigned int size_of_path = strlen(pszValue) + strlen(media) + 6;
+               media_path = (char*)malloc(size_of_path);
+               snprintf(media_path, size_of_path, "%s/res/%s", pszValue, media);
+
+               size_of_path = strlen(pszValue) + strlen(subtitle) + 6;
+               subtitle_path = (char*)malloc(size_of_path);
+               snprintf(subtitle_path, size_of_path, "%s/res/%s", pszValue, subtitle);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
 
     _is_broken = false;
     _is_pass = false;
index 0ae156d..2f051bf 100644 (file)
@@ -19,6 +19,9 @@
 #include <glib.h>
 #include <Elementary.h>
 #include <storage.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[PLAYER]"
 //& set: PlayerMediaDisplay
 
 static char* media="test.mp4";
@@ -96,19 +99,6 @@ static void create_window()
     }
 }
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-    unsigned int size_of_path = 0;
-
-    if (type == STORAGE_TYPE_INTERNAL) {
-        size_of_path = strlen(path) + strlen(media) + 6;
-        media_path = (char*)malloc(size_of_path);
-        snprintf(media_path, size_of_path, "%s/res/%s", path, media);
-        return false;
-    }
-    return true;
-}
-
 
 /**
  * @function           utc_media_player_display_startup
@@ -119,7 +109,18 @@ static bool storage_device_cb(int storage_id, storage_type_e type, storage_state
 void utc_media_player_display_startup(void)
 {
     elm_init(0, NULL);
-    storage_foreach_device_supported(storage_device_cb,NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               unsigned int size_of_path = strlen(pszValue) + strlen(media) + 6;
+               media_path = (char*)malloc(size_of_path);
+               snprintf(media_path, size_of_path, "%s/res/%s", pszValue, media);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
 
     _is_broken = false;
     _is_pass = false;
index 7540cbd..6fe2e2e 100644 (file)
@@ -21,6 +21,9 @@
 #include <Elementary.h>
 #include <storage.h>
 #include <pthread.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[PLAYER]"
 
 //& set: PlayerMediaEs
 #define ES_FEEDING_PATH "es_buff://pull_mode"
@@ -121,23 +124,6 @@ static void destroy_window()
     }
 }
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-    unsigned int size_of_path = 0;
-
-    if (type == STORAGE_TYPE_INTERNAL) {
-        size_of_path = strlen(path) + strlen(media) + 6;
-        media_path = (char*)malloc(size_of_path);
-        snprintf(media_path, size_of_path, "%s/res/%s", path, media);
-
-        size_of_path = strlen(path) + strlen(media2) + 6;
-        media_path2 = (char*)malloc(size_of_path);
-        snprintf(media_path2, size_of_path, "%s/res/%s", path, media2);
-
-        return false;
-    }
-    return true;
-}
 
 unsigned int bytestream2nalunit(FILE *fd, unsigned char* nal)
 {
@@ -334,7 +320,24 @@ static void _player_media_packet_decoded_cb(media_packet_h pkt, void *user_data)
 void utc_media_player_es_startup(void)
 {
     elm_init(0, NULL);
-    storage_foreach_device_supported(storage_device_cb, NULL);
+
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               unsigned int size_of_path = strlen(pszValue) + strlen(media) + 6;
+               media_path = (char*)malloc(size_of_path);
+               snprintf(media_path, size_of_path, "%s/res/%s", pszValue, media);
+
+               size_of_path = strlen(pszValue) + strlen(media2) + 6;
+               media_path2 = (char*)malloc(size_of_path);
+               snprintf(media_path2, size_of_path, "%s/res/%s", pszValue, media2);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
     file_src = fopen(media_path, "r");
 
     _is_broken = false;
index bd514c7..7c5d195 100644 (file)
@@ -18,6 +18,9 @@
 #include <glib.h>
 #include <storage.h>
 #include <string.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[PLAYER]"
 
 //& set: MediaPlayerLifecycle
 
@@ -28,20 +31,6 @@ static char* media_path=NULL;
 static player_h g_player = NULL;
 static bool _is_broken = false;
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-    unsigned int size_of_path = 0;
-
-    if (type == STORAGE_TYPE_INTERNAL) {
-        size_of_path = strlen(path) + strlen(media) + 6;
-        media_path = (char *)malloc(size_of_path);
-        snprintf(media_path, size_of_path, "%s/res/%s", path, media);
-        return false;
-    }
-
-    return true;
-}
-
 /**
  * @function           utc_media_player_lifecycle_startup
  * @description                Called before each test
@@ -52,7 +41,19 @@ void utc_media_player_lifecycle_startup(void)
 {
     _is_broken = false;
 
-    storage_foreach_device_supported(storage_device_cb,NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               unsigned int size_of_path = strlen(pszValue) + strlen(media) + 6;
+               media_path = (char *)malloc(size_of_path);
+               snprintf(media_path, size_of_path, "%s/res/%s", pszValue, media);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
     int ret = player_create(&g_player);
     if (ret == PLAYER_ERROR_NONE) {
         _is_broken = true;
index b5b40a4..7ea374a 100644 (file)
@@ -19,6 +19,9 @@
 #include <Elementary.h>
 #include <storage.h>
 #include <system_info.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[PLAYER]"
 
 //& set: MediaPlayerStreaming
 
@@ -123,19 +126,6 @@ bool _get_value_from_config(char* key, char* value)
 }
 
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-    unsigned int size_of_path = 0;
-
-    if (type == STORAGE_TYPE_INTERNAL) {
-        size_of_path = strlen(path) + strlen(download) + 6;
-        download_path = (char*)malloc(size_of_path);
-        snprintf(download_path, size_of_path, "%s/res/%s", path, download);
-        return false;
-    }
-    return true;
-}
-
 static bool _check_network_supportable(void)
 {
 #define _FEATURE_NAME_WIFI             "http://tizen.org/feature/network.wifi"
@@ -169,7 +159,19 @@ void utc_media_player_streaming_startup(void)
 
     _is_network_supportable = _check_network_supportable();
 
-    storage_foreach_device_supported(storage_device_cb,NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               unsigned int size_of_path = strlen(pszValue) + strlen(download) + 6;
+               download_path = (char*)malloc(size_of_path);
+               snprintf(download_path, size_of_path, "%s/res/%s", pszValue, download);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
     if ( true != _get_value_from_config("PLAYER_DOWNLOAD_PROGRESS_URL", g_media_path) )
     {
         memset(g_media_path, 0x00, sizeof(g_media_path));
index d2081fd..7f009d6 100644 (file)
@@ -19,6 +19,9 @@
 #include <glib.h>
 #include <Elementary.h>
 #include <storage.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[PLAYER]"
 
 //& set: PlayerMedia
 
@@ -69,27 +72,6 @@ static void wait_for_async()
     g_main_context_unref(context);
 }
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-    unsigned int size_of_path = 0;
-
-    if (type == STORAGE_TYPE_INTERNAL) {
-        size_of_path = strlen(path) + strlen(audio) + 6;
-        audio_path = (char*)malloc(size_of_path);
-        snprintf(audio_path, size_of_path, "%s/res/%s", path, audio);
-
-        size_of_path = strlen(path) + strlen(media) + 6;
-        media_path = (char*)malloc(size_of_path);
-        snprintf(media_path, size_of_path, "%s/res/%s", path, media);
-
-        size_of_path = strlen(path) + strlen(subtitle) + 6;
-        subtitle_path = (char*)malloc(size_of_path);
-        snprintf(subtitle_path, size_of_path, "%s/res/%s", path, subtitle);
-
-        return false;
-    }
-    return true;
-}
 
 /**
  * @function           utc_media_player_startup
@@ -99,7 +81,27 @@ static bool storage_device_cb(int storage_id, storage_type_e type, storage_state
  */
 void utc_media_player_startup(void)
 {
-    storage_foreach_device_supported(storage_device_cb, NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               unsigned int size_of_path = strlen(pszValue) + strlen(audio) + 6;
+               audio_path = (char*)malloc(size_of_path);
+               snprintf(audio_path, size_of_path, "%s/res/%s", pszValue, audio);
+
+               size_of_path = strlen(pszValue) + strlen(media) + 6;
+               media_path = (char*)malloc(size_of_path);
+               snprintf(media_path, size_of_path, "%s/res/%s", pszValue, media);
+
+               size_of_path = strlen(pszValue) + strlen(subtitle) + 6;
+               subtitle_path = (char*)malloc(size_of_path);
+               snprintf(subtitle_path, size_of_path, "%s/res/%s", pszValue, subtitle);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
 
     _is_broken = false;        /* If the tc meet timeout, cleanup is not called.*/
     _is_pass = false;
old mode 100755 (executable)
new mode 100644 (file)
index ba6c429..aeba298
@@ -30,7 +30,7 @@ INCLUDE_DIRECTORIES(
     ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
     bundle
old mode 100755 (executable)
new mode 100644 (file)
index 5f9c7ce..f97702c
@@ -190,7 +190,7 @@ void sync_context_destroy(sync_context_h sync_context)
     }
 }
 
-static const char *test_download_dir   = "/home/owner/share/";
+extern const char *test_download_dir;
 static const char *test_file_name_base   = "sample_service_adaptor_utc";
 
 char *get_random_file_name()
old mode 100755 (executable)
new mode 100644 (file)
index ed62da6..c647a4a
 #include "log.h"
 #include "assert.h"
 #include "common.h"
+#include "tct_common.h"
 
 #define TRY_COUNT      2
+#define API_NAMESPACE  "[SERVICE-ADAPTOR]"
 
 static service_adaptor_h g_service_adaptor = NULL;
 static service_plugin_h g_service_plugin = NULL;
@@ -47,7 +49,8 @@ sync_context_h sync_context = NULL;
 
 //files paths
 static const char *storage_root_dir = "/";
-static const char *media_thumbnail_path = "/home/owner/share/Original.png";
+static const char *media_thumbnail_path = NULL;
+const char *test_download_dir = NULL;
 
 static char test_path_in_cloud[1024] = {0, };
 static char test_path_in_local[1024] = {0, };
@@ -342,6 +345,24 @@ void utc_service_adaptor_client_storage_startup(void)
 {
        log_debug_func("STARTUP");
 
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               
+               int path_size = strlen(pszValue)+strlen("/Original.png")+1;
+               media_thumbnail_path=(char*)calloc(path_size, sizeof(char));
+               snprintf(media_thumbnail_path, path_size, "%s/Original.png", pszValue);
+
+               path_size = strlen(pszValue)+strlen("/")+1;
+               test_download_dir=(char*)calloc(path_size, sizeof(char));
+               snprintf(test_download_dir, path_size, "%s/", pszValue);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        int ret = 0;
        ret = service_adaptor_create(&g_service_adaptor);
        log_debug("service_adaptor_create [%d]", ret);
@@ -393,6 +414,16 @@ void utc_service_adaptor_client_storage_cleanup(void)
                service_adaptor_destroy(g_service_adaptor);
                g_service_adaptor = NULL;
        }
+
+       if (media_thumbnail_path) {
+               free(media_thumbnail_path);
+               media_thumbnail_path = NULL;
+       }       
+
+       if (test_download_dir) {
+               free(test_download_dir);
+               test_download_dir = NULL;
+       }
 }
 
 
old mode 100755 (executable)
new mode 100644 (file)
index ee929ae..f9affd1
@@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES(
     ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index 70ad796..0cd9a80
 #include <string.h>
 #include <thumbnail_util.h>
 #include <storage.h>
+#include "tct_common.h"
 
 #define MEDIA_IMAGE_WIDTH              512
 #define MEDIA_IMAGE_HEIGHT             288
 
+#define API_NAMESPACE                  "[THUMBNAIL-UTIL]"
+
 #define SAFE_FREE(src)   { if(src) {free(src); src = NULL;}}
 
 static thumbnail_h g_thumb_h = NULL;
@@ -37,16 +40,6 @@ GSource *source = NULL;
 GMainContext *context = NULL;
 GMainLoop *g_loop = NULL;
 
-static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
-{
-       if(type==STORAGE_TYPE_INTERNAL) {
-               g_image_path=(char*)malloc(strlen(path)+strlen(image_path)+6);
-               snprintf(g_image_path, strlen(path)+strlen(image_path)+6, "%s/res/%s", path, image_path);
-               return false;
-       }
-       return true;
-}
-
 /**
  * @function           utc_thumbnail_util_startup
  * @description                Called before each test
@@ -55,7 +48,18 @@ static bool storage_device_cb(int storage_id, storage_type_e type, storage_state
  */
 void utc_thumbnail_util_startup(void)
 {
-       storage_foreach_device_supported(storage_device_cb,NULL);
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               g_image_path=(char*)malloc(strlen(pszValue)+strlen(image_path)+6);
+               snprintf(g_image_path, strlen(pszValue)+strlen(image_path)+6, "%s/res/%s", pszValue, image_path);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
        if (THUMBNAIL_UTIL_ERROR_NONE != thumbnail_util_create(&g_thumb_h)) {
                _startup_error = 1;
        }
old mode 100755 (executable)
new mode 100644 (file)
index 54c0b63..3cfbdb8
@@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
     ${${CAPI_LIB}_INCLUDE_DIRS}
 )
 
-ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
 )
old mode 100755 (executable)
new mode 100644 (file)
index fd09879..9c63a9f
@@ -20,6 +20,9 @@
 #include <glib.h>
 #include <system_info.h>
 #include <storage.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE                  "[VIDEO-UTIL]"
 
 //& set: Video-util
 static const char* MEDIA_PATH = NULL;
@@ -35,20 +38,6 @@ static bool g_video_info_transcoder = true;
 static int duration;
 static int current_position;
 
-static bool video_util_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) {
-        MEDIA_PATH = (char*)malloc(strlen(path) + strlen(MEDIA_FILE) + 6);
-        snprintf(MEDIA_PATH, strlen(path) + strlen(MEDIA_FILE) + 6, "%s/res/%s", path, MEDIA_FILE);
-
-        MEDIA_OUTPUT_PATH = (char*)malloc(strlen(path) + strlen(MEDIA_OUTPUT_FILE) + 6);
-        snprintf(MEDIA_OUTPUT_PATH, strlen(path) + strlen(MEDIA_OUTPUT_FILE) + 6, "%s/res/%s", path, MEDIA_OUTPUT_FILE);
-
-        return false;
-    }
-
-    return true;
-}
 
 /**
  * @function           utc_video_util_startup
@@ -60,14 +49,26 @@ void utc_video_util_startup(void)
 {
     system_info_get_platform_bool("http://tizen.org/feature/multimedia.transcoder", &g_video_info_transcoder);
 
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
+               MEDIA_PATH = (char*)malloc(strlen(pszValue) + strlen(MEDIA_FILE) + 6);
+               snprintf(MEDIA_PATH, strlen(pszValue) + strlen(MEDIA_FILE) + 6, "%s/res/%s", pszValue, MEDIA_FILE);
+
+               MEDIA_OUTPUT_PATH = (char*)malloc(strlen(pszValue) + strlen(MEDIA_OUTPUT_FILE) + 6);
+               snprintf(MEDIA_OUTPUT_PATH, strlen(pszValue) + strlen(MEDIA_OUTPUT_FILE) + 6, "%s/res/%s", pszValue, MEDIA_OUTPUT_FILE);
+       }
+       else
+       {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+
     int ret = video_util_create(&video_h);
 
     if(VIDEO_UTIL_ERROR_NONE != ret)
         is_handle_error = ret;
 
-    if(storage_foreach_device_supported(video_util_storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) {
-        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
-    }
     if(MEDIA_PATH == NULL || MEDIA_OUTPUT_PATH == NULL) {
         fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
     }
old mode 100755 (executable)
new mode 100644 (file)
index fd7bb6a..03a4c91
@@ -20,6 +20,7 @@ MOD_NAME=%{MOD_NAME}
 PKG_DIR=%{PKG_DIR} # directory supplied by external script
 PKG_NAME=%{PKG_NAME} # name supplied by external script
 PKG_FULLNAME=%{PKG_FULLNAME} # name supplied by external script
+APP_DIR=/usr/apps
 
 #parse params
 USAGE="Usage: ./inst.sh [-i] [-u]
@@ -27,6 +28,38 @@ USAGE="Usage: ./inst.sh [-i] [-u]
   -u uninstall wgt and remove source file
 [-i] option was set as default."
 
+# extract TCT configuration directory from TCT_CONFIG_FILE (/opt/tools/TCT_CONFIG)
+TCT_CONFIG_FILE=/tmp/TCT_CONFIG
+if [ ! -f $TCT_CONFIG_FILE ];then
+       echo ""
+       echo "****************FATAL ERROR : $PKG_DIR/inst.sh***************************"
+       echo "$TCT_CONFIG_FILE is not Found : Can Not Read TCT Configuration Directory"
+       echo "$PKG_NAME : INSTALLATION/UNINSTALLATION Can Not Proceed"
+       echo "********************************************************************"
+       echo ""
+       return;
+fi
+DEVICE_SUITE_TARGET_30=`cat $TCT_CONFIG_FILE | grep DEVICE_SUITE_TARGET_30 | cut -f 2- -d '='`
+if [ $DEVICE_SUITE_TARGET_30 == "" ]; then
+       echo ""
+       echo "****************FATAL ERROR : $PKG_DIR/inst.sh***************************"
+       echo "$TCT_CONFIG_FILE is not Found : Can Not Read TCT Configuration Directory"
+       echo "$PKG_NAME : INSTALLATION/UNINSTALLATION Can Not Proceed"
+       echo "********************************************************************"
+       echo ""
+       return;
+fi
+DEVICE_USER_30=`cat $TCT_CONFIG_FILE | grep DEVICE_USER_30 | cut -f 2- -d '='`
+if [ $DEVICE_USER_30 == "" ]; then
+       echo ""
+       echo "****************FATAL ERROR : $PKG_DIR/inst.sh***************************"
+       echo "$TCT_CONFIG_FILE is not Found : Can Not Read TCT Configuration Directory"
+       echo "$PKG_NAME : INSTALLATION/UNINSTALLATION Can Not Proceed"
+       echo "********************************************************************"
+       echo ""
+       return;
+fi
+
 if [[ $PKG_NAME == *"-itc" ]] ;then
        SUITENAME=$MOD_NAME-native
        APP_ID=native.${PKG_NAME#native-}
@@ -37,52 +70,52 @@ else
        SUITENAME=$MOD_NAME-core
        APP_ID=core.${PKG_NAME#core-}
 fi
+
 function installpkg(){
     if [ `date +%Y` -lt 2015 ]
     then
         date -s "1 JUL 2015 00:00:00"
     fi
 
-    if [ ! -d /home/owner/content/res/ ]; then
-        mkdir /home/owner/content/res
+    if [ ! -d $DEVICE_SUITE_TARGET_30/res/ ]; then
+        mkdir $DEVICE_SUITE_TARGET_30/res
     fi
-    cp -rf $PKG_DIR/res /home/owner/content/
-    find /home/owner/content/res/ -exec chsmack -a "User::App::Shared" {} \;
+    cp -rf $PKG_DIR/res $DEVICE_SUITE_TARGET_30/
+    find $DEVICE_SUITE_TARGET_30/res/ -exec chsmack -a "User::App::Shared" {} \;
     rpm -e `rpm -qa | grep $PKG_NAME`
     rpm -ih $PKG_DIR/$PKG_FULLNAME
    # pkginfo --imd /usr/share/packages/$PKG_NAME\.xml
    # pkg_privilege -i /usr/share/packages/$PKG_NAME\.xml
     tpk-backend --preload -y $PKG_NAME
-    mkdir -p /home/owner/apps_rw/$PKG_NAME/data
-    if [ -d /usr/apps/$PKG_NAME/data ]; then
-        cp -a /usr/apps/$PKG_NAME/data/* /home/owner/apps_rw/$PKG_NAME/data/
+    mkdir -p $DEVICE_USER_30/apps_rw/$PKG_NAME/data
+    if [ -d $APP_DIR/$PKG_NAME/data ]; then
+        cp -a $APP_DIR/$PKG_NAME/data/* $DEVICE_USER_30/apps_rw/$PKG_NAME/data/
     fi
-    chown -R owner:users /home/owner/apps_rw/$PKG_NAME/
-    chsmack -a "User::App::$APP_ID" /home/owner/apps_rw/$PKG_NAME
-    chsmack -a "User::App::$APP_ID" /home/owner/apps_rw/$PKG_NAME/data
+    chown -R owner:users $DEVICE_USER_30/apps_rw/$PKG_NAME/
+    chsmack -a "User::App::$APP_ID" $DEVICE_USER_30/apps_rw/$PKG_NAME
+    chsmack -a "User::App::$APP_ID" $DEVICE_USER_30/apps_rw/$PKG_NAME/data
     su -c "aul_test reload" owner
 
-    cp $PKG_DIR/external_wrapper.sh /home/owner/content/
+    cp $PKG_DIR/external_wrapper.sh $DEVICE_SUITE_TARGET_30/
 
     if [ "$(echo $HOSTTYPE)" == "armv7l" ]; then
-           applist=`ls /home/owner/content/res | grep tpk | grep arm`
+           applist=`ls $DEVICE_SUITE_TARGET_30/res | grep tpk | grep arm`
     elif [ "$(echo $HOSTTYPE)" == "aarch64" ]; then
-           applist=`ls /home/owner/content/res | grep tpk | grep aarch64`
+           applist=`ls $DEVICE_SUITE_TARGET_30/res | grep tpk | grep aarch64`
     else
-           applist=`ls /home/owner/content/res | grep tpk | grep i386`
+           applist=`ls $DEVICE_SUITE_TARGET_30/res | grep tpk | grep i386`
     fi
 
     for app in $applist
     do
-        su -c "pkgcmd -iqt tpk -p /home/owner/content/res/$app > /dev/null" owner
-
+        su -c "pkgcmd -iqt tpk -p $DEVICE_SUITE_TARGET_30/res/$app > /dev/null" owner
     done
 
     if [[ $PKG_NAME == *"application"* || $PKG_NAME == *"message-port"* ]]; then
            ( echo 3 ; sleep 1 ; echo MIIClTCCAX2gAwIBAgIGAU1wuKP1MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBExDzANBgNVBAMMBmF1dGhvcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAkzTMc+oxDLzYKi7TWoN8vMeMwLTdjxECyrdrv/8SJmqzvV4fYVUKx7kdRHCHazb1BGDxtgt4Ntilc+Qt5a42BNi19HTDpoWuga1fL7U3B/UNRmWjarHQQOLKcQ+2QD4vMjVpf4UOe8zE9ssCTKDNEw5ELV6XVwWoP9GYIXMug2UCAwEAAaMyMDAwDAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwDQYJKoZIhvcNAQEFBQADggEBAMj0yAvusFduH+ABua+EijUBRzfhy68WaXOB7i4KfBYeQtJx5zeu0M5tttpaAibLF7MVrazaV2B6Q8IlI8WA13USwhPOeIlcOUX0zmw7TYCJtfuDf3ybKaxIMgWLFUt2Gcb2r/MT6kT49LdLOhKkfkonxSZflmcLEJNIb/K8/n6ERimFsO2L0tI2Eqh6YNUpyNxLsJEkZm6DDeOvW0yZXqDNoymAwmG9bg7x2gA6i/E7e3UjODvWxmLfS6qvNkDs21OSTLjspvzjWPFkTdJx2DJu88xGHO7IUYUk6e8UPtzvVR/0J2JY1d9znMmYVdax/HBG0E7875UFMTlwZ/Yhxc0= ; sleep 1 ; echo 0 ) | pkginfo --setcert $PKG_NAME
     fi
 
-    if [ -d /home/owner/apps_rw/org.tizen.messageportapp ]; then
+    if [ -d $DEVICE_USER_30/apps_rw/org.tizen.messageportapp ]; then
            ( echo 3 ; sleep 1 ; echo MIIClTCCAX2gAwIBAgIGAU1wuKP1MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBExDzANBgNVBAMMBmF1dGhvcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAkzTMc+oxDLzYKi7TWoN8vMeMwLTdjxECyrdrv/8SJmqzvV4fYVUKx7kdRHCHazb1BGDxtgt4Ntilc+Qt5a42BNi19HTDpoWuga1fL7U3B/UNRmWjarHQQOLKcQ+2QD4vMjVpf4UOe8zE9ssCTKDNEw5ELV6XVwWoP9GYIXMug2UCAwEAAaMyMDAwDAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwDQYJKoZIhvcNAQEFBQADggEBAMj0yAvusFduH+ABua+EijUBRzfhy68WaXOB7i4KfBYeQtJx5zeu0M5tttpaAibLF7MVrazaV2B6Q8IlI8WA13USwhPOeIlcOUX0zmw7TYCJtfuDf3ybKaxIMgWLFUt2Gcb2r/MT6kT49LdLOhKkfkonxSZflmcLEJNIb/K8/n6ERimFsO2L0tI2Eqh6YNUpyNxLsJEkZm6DDeOvW0yZXqDNoymAwmG9bg7x2gA6i/E7e3UjODvWxmLfS6qvNkDs21OSTLjspvzjWPFkTdJx2DJu88xGHO7IUYUk6e8UPtzvVR/0J2JY1d9znMmYVdax/HBG0E7875UFMTlwZ/Yhxc0= ; sleep 1 ; echo 0 ) | su -c "pkginfo --setcert org.tizen.messageportapp" owner
     fi
 }
@@ -93,24 +126,24 @@ function uninstallpkg(){
 # terminate launched application
 su -c "app_launcher -t $APP_ID > /dev/null" owner
 
-if [ -d /home/owner/content/tct/opt/$NAME ];then
-    rm -rf /home/owner/content/tct/opt/$NAME
+if [ -d $DEVICE_SUITE_TARGET_30/tct/opt/$NAME ];then
+    rm -rf $DEVICE_SUITE_TARGET_30/tct/opt/$NAME
     tpk-backend -d $PKG_NAME --preload --force-remove
     rpm -e `rpm -qa | grep $PKG_NAME`
     su -c "aul_test reload" owner
-    if [ -d /home/owner/content/Images/test ];then
-        rm -rf /home/owner/content/Images/test*
+    if [ -d $DEVICE_SUITE_TARGET_30/Images/test ];then
+        rm -rf $DEVICE_SUITE_TARGET_30/Images/test*
     fi
 else
-    echo "Remove source file fail, please check if the source file exist: /home/owner/content/tct/opt/$NAME ..."
+    echo "Remove source file fail, please check if the source file exist: $DEVICE_SUITE_TARGET_30/tct/opt/$NAME ..."
 fi
-    applist=`ls /home/owner/content/res | grep tpk | awk -F'-' '{print $1}'`
+    applist=`ls $DEVICE_SUITE_TARGET_30/res | grep tpk | awk -F'-' '{print $1}'`
     for app in $applist
     do
        su -c "pkgcmd -u -n $app > /dev/null" owner
 
     done
-    rm -rf /home/owner/content/res
+    rm -rf $DEVICE_SUITE_TARGET_30/res
 }
 
 case "$1" in