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
%{APP_PATH}%{name}/*
/usr/share/packages/native-%{MODULE_NAME}-ctc.xml
/usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}/*
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}/*
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
#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
%{APP_PATH}%{name}/*
/usr/share/packages/native-%{MODULE_NAME}-itc.xml
/usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}*
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
%{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
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 &
%{APP_PATH}%{name}/*
/usr/share/packages/native-%{MODULE_NAME}-itc.xml
/usr/share/license/%{name}
-/home/owner/content/*
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
%{APP_PATH}%{name}/*
/usr/share/packages/%{name}.xml
/usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}*
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
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}*
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
/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/*
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
/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
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
/usr/apps/%{name}/*
/usr/share/packages/%{name}.xml
/usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}/*
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
/usr/apps/%{name}/*
/usr/share/packages/%{name}.xml
/usr/share/license/%{name}
-/home/owner/content/*
+%{INTERNAL_STORAGE_PATH}/*
function build {
APP_DIR=/usr/apps/
+INTERNAL_STORAGE_DIR=/home/owner/content/
TAG_SPEC=$1
PREFIX="native"
if [ -n "$2" ]; then
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
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
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"
# 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
function build {
APP_DIR=/usr/apps/
+INTERNAL_STORAGE_DIR=/home/owner/content/
TAG_SPEC=$1
PREFIX="native"
if [ -n "$2" ]; then
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
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
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"
# 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
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
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\"?>";
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>";
}
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)
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")
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;
+}
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_
#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
remove(ERR_LOG);
}
+ storage_foreach_device_supported(storage_device_cb,NULL);
+
nRetVal = media_streamer_create(&streamer);
if(nRetVal < 0)
{
return;
}
+ if (g_pszFilePath) {
+ free(g_pszFilePath);
+ g_pszFilePath = NULL;
+ }
+
return;
}
#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;
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();
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);
*/
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);
+ }
}
/**
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;
}
//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();
//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();
//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();
* @{
*/
-const char *g_pszFilePath = "/home/owner/content/res/Ice.mp4";
+const char *g_pszFilePath = NULL;
/**
* @function ITs_capi_media_streamer_startup
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)
{
return;
}
+ if (g_pszFilePath) {
+ free(g_pszFilePath);
+ g_pszFilePath = NULL;
+ }
+
+
return;
}
}
-/**
- * @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
#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;
}
#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
* @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
#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;
#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
#include <jpeglib.h>
#include <mv_surveillance.h>
#include <image_util.h>
+#include <storage.h>
//#include <json/json.h>
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****************************************************/
/**
*/
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;
}
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
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;
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);
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;
* @{
*/
+extern const char *g_pszACTUAL_FILE_PATH;
+extern const char *g_pszDOWNLOAD_PATH;
+
//Add helper function definitions here
/**
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();
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);
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();
#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
//& set: ServiceAdaptor
+extern const char *g_pszACTUAL_FILE_PATH;
+extern const char *g_pszDOWNLOAD_PATH;
+
/****************************************************Callback Start****************************************************/
/**
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;
}
#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;
+ }
}
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
//& set: ServiceAdaptor
+
+const char *g_pszACTUAL_FILE_PATH = NULL;
+const char *g_pszDOWNLOAD_PATH = NULL;
+
+
/****************************************************Callback Start****************************************************/
/**
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;
}
#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;
+ }
+
}
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
* @{
*/
+const char *g_pszICON_PATH = NULL;
+
/*********************************************************CallBack Start*********************************************************/
/**
* @function ShortcutAddToHomeWidgetCB
#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;
#endif
elm_shutdown();
+
+ if (g_pszICON_PATH) {
+ free(g_pszICON_PATH);
+ g_pszICON_PATH = NULL;
+ }
+
return;
}
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);
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);
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);
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}
)
#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"
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
}
_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);
}
}
${${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
#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
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";
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)
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
det_cs_models_p = NULL;
}
+ if (test_path) {
+ free(test_path);
+ test_path = NULL;
+ }
+
printf("capi-media-vision tests CLEANUP is completed\n");
}
#include <image_util.h>
#include <system_info.h>
+#include <storage.h>
+#include "tct_common.h"
#define FILE_PATH_SIZE 1024
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)
else
isVisionSupported = false;
+ storage_foreach_device_supported(storage_device_cb,NULL);
+
if (NULL == tracking_model)
{
gStartupError = mv_face_tracking_model_create(&tracking_model);
*/
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)
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;
}
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);
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;
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:
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
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(
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;
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(
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);
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);
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);
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);
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);
#include <image_util.h>
#include <system_info.h>
+#include <storage.h>
+#include "tct_common.h"
#define FILE_PATH_SIZE 1024
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)
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) {
*/
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");
}
/**
#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;
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
else
isVisionSupported = false;
+ storage_foreach_device_supported(storage_device_cb,NULL);
+
gStartupError = MEDIA_VISION_ERROR_NONE;
gStartupError = mv_surveillance_event_trigger_create(
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;
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,
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,
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);
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);
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);
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);
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;
}
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;
}
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;
}
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;
}
{
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;
}
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;
}
${${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
#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) { }
${${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}
)
#include <image_util.h>
#include <storage.h>
#include <glib.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[IMAGE-UTIL]"
#define WRONG_PATH ""
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;
{
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);
{
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);
#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;
}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;
{
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);
#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
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)
{
*/
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);
}
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)
#include <iotcon.h>
#include "utc-iotcon-common.h"
+#include "tct_common.h"
+
+#define API_NAMESPACE "[IOTCON]"
static bool g_feature_security;
{
}
+static const char *icutc_svr_db_file = "oic_svr_db.dat";
/**
* @testcase utc_iotcon_secure_initialize_p
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);
${${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
#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
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)
{
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;
}
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 ) {
${${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}
)
#include <storage.h>
#include <dlog.h>
// #include <media_packet_internal.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[MEDIAMUXER]"
//& set: Mediamuxer
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
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);
}
${${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}
)
#include <storage.h>
#include <dlog.h>
#include <glib.h>
+#include "tct_common.h"
//#include <media_packet.h>
//#include <media_format.h>
#undef LOG_TAG
#endif
-#define LOG_TAG "UTC_MUX"
+#define LOG_TAG "UTC_MUX"
+#define API_NAMESPACE "[MEDIAMUXER]"
//& set: Mediamuxer
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
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);
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__);
}
${${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}
)
#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] = {
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;
/* 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) )
${${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}
)
#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;
*/
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;
}
{
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;
+ }
}
/**
{
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);
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);
{
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);
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)
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)
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)
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)
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);
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 */
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);
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 */
{
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);
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);
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);
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);
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);
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);
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);
{
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);
{
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;
${${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}
)
#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";
*/
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;
${${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}
)
#include <glib.h>
#include <storage.h>
#include <string.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[PLAYER]"
//& set: MediaPlayerCallback
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
*/
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;
#include <glib.h>
#include <Elementary.h>
#include <storage.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[PLAYER]"
//& set: PlayerMediaDisplay
static char* media="test.mp4";
}
}
-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
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;
#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"
}
}
-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)
{
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;
#include <glib.h>
#include <storage.h>
#include <string.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[PLAYER]"
//& set: MediaPlayerLifecycle
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
{
_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;
#include <Elementary.h>
#include <storage.h>
#include <system_info.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[PLAYER]"
//& set: MediaPlayerStreaming
}
-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"
_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));
#include <glib.h>
#include <Elementary.h>
#include <storage.h>
+#include "tct_common.h"
+
+#define API_NAMESPACE "[PLAYER]"
//& set: PlayerMedia
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
*/
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;
${${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
}
}
-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()
#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;
//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, };
{
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);
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;
+ }
}
${${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}
)
#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;
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
*/
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;
}
${${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}
)
#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;
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
{
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__);
}
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]
-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-}
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
}
# 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